A = list(input()) ANS = A+A[::-1] for i in range(len(A)+1): temp = A+A[:len(A)-i][::-1] if temp==temp[::-1] and len(ANS)>len(temp): ANS = temp print(''.join(ANS))