<reponame>BakaErii/ACM_Collection
#
# @author	Moe_Sakiya    	<EMAIL>
# @date    	2018-02-21 00:40:32
#

string=input()

print(string+string[::-1])
#
# @author	Moe_Sakiya    	<EMAIL>
# @date    	2018-02-21 00:40:32
#

string=input()

print(string+string[::-1])
# # @author	Moe_Sakiya    	<EMAIL> # @date    	2018-02-21 00:40:32 #