n = int(input("Enter n: ")) for _ in range(n): l = "".join([str(s+1) for s in range(_)]) r = str(n)*(n-len(l)) print(l+r)