import sys input = lambda: sys.stdin.readline().rstrip() def is_kaibun(s): n = len(s) for i in range(n//2): if s[i] == s[n-i-1]: continue return False return True # ----------------------- # a = input() ans = a + a[::-1] ans_min = 2*len(a) for i in range(len(a)+1): t = a[:i] t = t + t[::-1] if t[:len(a)] == a: if len(t) < ans_min: ans_min = len(t) ans = t t = a[:i] t = t[:-1] + t[::-1] if t[:len(a)] == a: if len(t) < ans_min: ans_min = len(t) ans = t print(ans)