n = int(input()) for i in range(n): if i < n // 2: print("0" * (n - 1 - i) + "1" + "2" * i) else: print("0" * (n - i - 1) + "2" * (i + 1))