Problem: You are given a string A. Find a string B, where B is a palindrome and A is a subsequence of B.

A subsequence of a string is a string that can be derived from it by deleting some (not necessarily consecutive) characters without changing the order of the remaining characters. For example, "cotst" is a subsequence of "contest".

A palindrome is a string that reads the same forward or backward.

The length of string B should be at most 104. It is guaranteed that there always exists such string.

You do not need to find the shortest answer, the only restriction is that the length of string B should not exceed 104.

Input

First line contains a string A (1 ≤ |A| ≤ 103) consisting of lowercase Latin letters, where |A| is a length of A.

Output

Output single line containing B consisting of only lowercase Latin letters. You do not need to find the shortest answer, the only restriction is that the length of string B should not exceed 104. If there are many possible B, print any of them.

Examples

Input

aba


Output

aba

Input

ab


Output

aabaa

Note

In the first example, "aba" is a subsequence of "aba" which is a palindrome.

In the second example, "ab" is a subsequence of "aabaa" which is a palindrome.

Solution (in PYTHON3):

Solution:
"""n,m=map(int, input("").split())
l=[]
for _ in range(n):
    a,b=map(int, input("").split())
    l.append((a*m)/b)
print("%.8f" % min(l))
"""
"""def sd(n):
   r = 0
   while n:
       r, n = r + n % 10, n // 10
   return r
a=int(input())
_sum=19
while a>1:
   _sum=_sum+9
   if sd(_sum)==10:
      a=a-1
print(_sum)"""
"""#def ans(l):
n,m,k=map(int, input("").split())
matrix = [[j for j in input().strip()] for i in range(n)]
print(matrix)
"""
"""for _ in range(int(input())):
    s=list(input())
    count=0
    ch=['c','e','f','h']
    for i in range(len(s)-3):
        am=[]
        for j in range(4):
            am.append(s[j+i])
        am.sort()
        if ch==am:
            count+=1
    if count>=1:
        print("lovely ",count)
    else:
        print("normal")
"""
"""while True:
    a=int(input())
    if a==42:
        break
    print(a)
"""
"""_input=int(input())
for k in range(_input):
    m,n=map(int, input("").split())
    for i in range(m, n+1):
        if i>1:
            for j in range(2,i):
                if(i%j)==0:
                    break
            else:
                print(i)
    if k!=_input-1: 
        print("\n")


"""
"""def primes_method5(m,n):
    out = list()
    sieve = [True] * (n+1)
    for p in range(m, n+1):
        if (sieve[p]):

            out.append(p)
            for i in range(p, n+1, p):
                sieve[i] = False
    return out
m,n=map(int, input("").split())
print(primes_method5(m,n))"""
"""for _ in range(int(input())):
    n=int(input())
    l=[int(i) for i in input().split()]
    count1=0
    count2=0
    chef1=l[0:][::2]
    chef2=l[1:][::2]
    for i in range(n//2):
        if max(chef1)<max(chef2):
            count2+=1
            chef1.remove(max(chef1))
            chef2.remove(max(chef2))
        elif max(chef1)>max(chef2):
            count1+=1
            chef1.remove(max(chef1))
            chef2.remove(max(chef2))
    if count1>count2:
        print("1")
    elif count2>count1:
        print("2")
    else:
        print("draw")"""
"""for _ in range(int(input())):
    n,m,x,k=map(int, input("").split())
    s=input()
    ev=s.count('E')
    od=s.count('O')
    e=int(m/2)
    o=m-e
    val=min(x*e,ev)+min(x*o,od)
    if val>=n:
        print("yes")
    else:
        print("no")
"""
"""import math
_sum=0
for _ in range(6):
    _sum+=int(input())
print(math.mean(_sum,6))
"""
"""for _ in range(int(input())):
    _str=input()
    _s=''
    for i in range(int(len(_str)/2)):
        if i%2==0:
            _s+=_str[i]
    print(_s)"""
"""def csb(l,c):
    ev=("*."*(c//2+1))[0:c]
    od=(".*"*(c//2+1))[0:c]
    for i in range(l):
        print(od if i%2 else ev)
for _ in range(int(input())):
    l,c=map(int, input("").split())
    csb(l,c)
"""
"""for _ in range(int(input())):
    s=input()
    cnt=0
    p=0
    q=len(s)-1
    ans=[]
    pos=0
    v=[[] for i in range(26)]
    for i in range(len(s)):
        a=ord(s[i])-97
        v[a].append(i+1)
    for i in range(26):
        if len(v[i])%2==1:
            cnt+=1
            pos=i
    if cnt>1:
        print("-1")
        continue
    elif cnt==1:
        for i in range(26):
            if len(v[i])>0 and len(v[i])%2==0:
                for j in range(0,len(v[i]),2):
                    ans.insert(p,v[i][j])
                    p+=1
                    ans.insert(q,v[i][j+1])
                    q-=1
        for i in range(len(v[pos])):
            ans.insert(p,v[pos][i])
            p+=1
    else:
        for i in range(26):
            if len(v[i])>0:
                for j in range(0,len(v[i]),2):
                    ans.insert(p,v[i][j])
                    p+=1
                    ans.insert(q,v[i][j+1])
                    q-=1
    for i in range(len(s)):
        print(ans[i],end=' ')
    print(end='\n') 
"""
def shortestPalindrome(s):
        def getPrefix(pattern):
            prefix = [-1] * len(pattern)
            j = -1
            for i in range(1, len(pattern)):
                while j > -1 and pattern[j+1] != pattern[i]:
                    j = prefix[j]
                if pattern[j+1] == pattern[i]:
                    j += 1
                prefix[i] = j
            return prefix

        if not s:
            return s
            
        A = s + s[::-1]
        prefix = getPrefix(A)
        i = prefix[-1]
        while i >= len(s):
            i = prefix[i]
        return s[i+1:][::-1] + s
s=input()
if s[::-1]==s:
    print(s)
else:
    print(shortestPalindrome(s))