for i in range(1, 4): for j in range(1, i + 1): print(j, end="") print()
1 12 123
123 12 1
1 1 2 1 2 3
112123