s = input() sr = s[::-1] n = len(s) pal_len = 0 for i in range(1,n+1): valid = True for j in range(i): if sr[j] != sr[i-1-j]: valid = False if valid: pal_len = i print(s + sr[pal_len:])