#存放字串
value = input()
#迴圈起始值
i = 1
#前字串
aStr = ""
#後字串
bStr = ""
#當 i 比 輸入字串長度還大時跳出
while i<len(value):
aStr += value[:i]
bStr += value[i:]
i=i+1
#輸出結果
print(aStr+value+bStr)
挑戰行數盡量少而已。最佳解請給別人
s = "hello"
s1, s2 = zip(*[(s[0:i], s[len(s)-i:]) for i in range(1, len(s))])
print("".join(s1)+s+"".join(s2[::-1]))