
#  File: MagicSquare.py

#  Description:

#  Student Name:

#  Student UT EID:

#  Partner Name:

#  Partner UT EID:

#  Course Name: CS 313E

#  Unique Number: 

#  Date Created:

#  Date Last Modified:

import sys

# checks if a 1-D list if converted to a 2-D list is magic
# a is 1-D list of integers
# returns True if a is magic and False otherwise
def is_magic ( a ):
  return

# this function recursively permutes all magic squares
# a is 1-D list of integers and idx is an index in a
# function stores all 1-D lists that are magic in the list all_magic
def permute ( a, idx, all_magic ):
  return

def main():
  # read the dimension of the magic square
  line = sys.stdin.readline()
  line = line.strip()
  n = int (line)

  # create an empty list for all magic squares
  all_magic = []

  # create the 1-D list that has the numbers 1 through n^2

  # generate all magic squares using permutation 

  # print all magic squares
  for square in all_magic:
    print (square)

if __name__ == "__main__":
  main()

