S = input() def check(s): n = len(s) // 2 flag = True for i in range(n): if s[i] != s[-i-1] : flag = False; break return flag if check(S) : exit(print(S)) N = len(S) for i in range(1, N+1): if check(S[i:]): ans = S for j in range(i, -1, -1): ans = ans + S[j] break print(ans)