a = input()for i in range(0,len(a)): for j in range(0,len(a)): print(a[(i + j) % len(a)], end="") print()