def reve(a):
	if len(a)%4==0:
		print(a[::-1])
	else:
		print(a)
a=input()
reve(a)