n = int(input()); m= 2**n if n==1: exit(print(-1)) for i in range(m): print(*range(i*m,(i+1)*m))