from collections import * from itertools import * from functools import * import sys,math input = sys.stdin.readline A = list(input())[:-1] N = len(A) for i in range(N): tmp = A[:] Y = A[:i] Y.reverse() tmp = tmp + Y n = len(tmp) if all(tmp[i]==tmp[-1-i] for i in range(n)): print(''.join(tmp)) exit()