def reqfun(string):
	if(len(string)%4==0):
		return string[::-1]
	else:
		return string

string = input()
print(reqfun(string))