'use strict';
function main(input) {
  let count = 0;
  let side = input.split('\n')[0];
  let peoples = input.split('\n')[1].split(' ');
  for (let i = 0;i < side * side;i++) {
    console.log(i);
  }
}
main(fs.readFileSync('/dev/stdin', 'utf8'))