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 10^4. 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 10^4.


-----Input-----

First line contains a string A (1 ≤ |A| ≤ 10^3) 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 10^4. 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.

Difficulty: EASY

Solutions:
st = input()
print(st + st[::-1])


s = input()
s1 = s[::-1]
print(s, s1, sep='')


__author__ = 'Dilshod'
s = input()
ans = ''
for i in range(1, len(s) + 1):
	ans += s[-i]
print(s + ans)


def main():
	a = input()
	print(a + ''.join(reversed(a)))
main()


s = str(input())
print(s + s[::-1])


s = input()
l = list(s)
l.reverse()
s1 = ''.join(l)
print(s + s1)


s = [x for x in input()]
s1 = list(reversed(s))
print(*s, *s1, sep='')


x = input().strip()
print(x + x[::-1])


a = input().strip()
print('{}{}'.format(a, a[::-1]))


class Main:
	a = input()
	print(a + a[::-1])
if __name__ == 'main':
	Main()


def check(s):
	n = len(s)
	for i in range(n // 2):
		if s[i] != s[n - 1 - i]:
			return False
	return True
s = input().strip()
t = s + s[::-1]
if check(t) is not True:
	print(-1)
	exit(0)
print(t)


s = input()
s = s + s[-1:-len(s) - 1:-1]
print(s)


a = list(input())
b = a[0:]
a.reverse()
for i in a:
	b.append(i)
print(''.join(b))


a = str(input())
print(a + a[::-1])


a = input()
print(a, end='')
a = a[::-1]
print(a)


s = input()
ss = s[::-1]
s += ss
print(s)


z = input()
l = z + z[::-1]
print(l)


a = input()
print(a + a[::-1])


S = input()
L = [s for s in S]
L.reverse()
print(S + ''.join(L))


s = input()
print(s + ''.join(reversed(s)))


print((lambda s: s + s[::-1])(input()))


def main():
	a = input()
	a += a[::-1]
	print(a)
main()


s = input()
d = ''
for i in range(len(s) - 1, -1, -1):
	d += s[i]
print(s + d)


def palindromeSupersequence(s):
	return s + s[::-1]
s = input()
print(palindromeSupersequence(s))


s = input()
w = s + s[::-1]
print(w)


st = input()
sk = ''.join(reversed(st))
smt = st + sk
print(smt)


n = input()
print(n, end='')
n = list(n)
n.reverse()
for i in n:
	print(i, end='')


a = list(input())
print(''.join(a + a[::-1]))


def Palindromic(strA):
	strB = ''
	i = 0
	while i < len(strA):
		strB += strA[len(strA) - 1 - i]
		i += 1
	return strA + strB

def hello():
	ar = str(input().strip())
	result = Palindromic(ar)
	print(result)
hello()


s = input()
l = len(s)
t = ''
for i in range(1, l + 1):
	t = t + s[-i]
print('%s%s' % (s, t))


from sys import stdin, stdout

def rint():
	return map(int, stdin.readline().split())
a = input()
b = a[::-1]
a = a + b
print(a)


import sys
n = input()
r = n[::-1]
print(str(n + r))


s = input()
print(s, end='')
print(s[::-1])


N = input().strip()
print(N + N[::-1])


a = input().strip()
print(a + a[::-1])


x = input()
print(x + x[::-1])


n = input()
n = list(n)
k = reversed(n)
k = list(k)
n = n + k
abc = ''
for i in n:
	abc = abc + i
print(abc)


a = input()
print(a + ''.join(reversed(list(a))))


o = input()
print(o + o[::-1])


s = list(input().replace(' ', ''))
print(*s + list(reversed(s)), sep='')


a = input()
c = a
b = a[::-1]
print(c + b)


first = input()
second = first[::-1]
third = first + second
print(third)


a = input()
b = reversed(a)
print(a, *b, sep='')


n = input()
print(n, n[::-1], sep='')


string = input()
print(string + string[::-1])


o = input()
print(o, o[::-1], sep='')


s = input()
N = len(s)
for i in range(2 * N):
	if i < N:
		print(s[i], end='')
	else:
		print(s[2 * N - i - 1], end='')


def solve(inp):
	return inp + inp[::-1]
print(solve(input()))


strlist = input()
print(strlist + strlist[::-1])


s = input()
s1 = s + s[::-1]
print(s1)


a = input()
print(a + ''.join(reversed(a)))


s = input()
s2 = s
for k in range(len(s) - 1, -1, -1):
	s += s2[k]
print(s)


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
ABCD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
months = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
s = input()
print(s + s[::-1])


n = input()
s = n[::-1]
print(n + s)


i = input()
print(i + ''.join(reversed(i)))


s = input()
print(s, ''.join(reversed(s)), sep='')


a = input()
print(a, a[::-1], sep='')


def solution(l1):
	c_out = ''
	for x in l1:
		c_out += x
	l1.reverse()
	for x in l1:
		c_out += x
	return c_out

def answer():
	l1 = list(input())
	print(solution(l1))
answer()


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	s = S()
	return s + s[::-1]
print(main())


def solve(A):
	return A + A[::-1]

def main():
	A = input()
	print(solve(A))
main()


s = list(input())
for i in s:
	print(i, end='')
s.reverse()
for i in s:
	print(i, end='')


import sys
if sys.version_info < (3, 0):
	lrange = range
	input = raw_input
	range = xrange
s = input()
print(s + s[::-1])


A = input()
print(A + A[::-1])


A = input()
rev = A[::-1]
print(A + rev)


s = input()
t = s + s[::-1]
print(t)


a = input()
n = len(a) // 2
print(a + a[len(a):0:-1] + a[0])


x = list(input())
for i in x:
	print(i, end='')
x.reverse()
for i in x:
	print(i, end='')


s = input()
s2 = ''.join(list(reversed(s)))
print(s + s2)


line = input()
len1 = len(line)
string = line[::-1]
print(line + string)


s = input()
s1 = s
for q in range(len(s1)):
	s = s + s1[len(s1) - q - 1]
print(s)


a = input()
b = a + a[::-1]
print(b)


a = input()
print(a, end='')
for i in range(len(a) - 1, -1, -1):
	print(a[i], end='')


word = str(input())
i = len(word) - 1
while i >= 0:
	word = word + word[i]
	i -= 1
print(word)


s = str(input())
print(s + ''.join(reversed(s)))


n = input()
t = n[::-1]
print(n + t)


inp = input()
print(inp + inp[::-1])


n = input()
print(n + n[::-1])


import copy
a = list(input())
b = copy.copy(a)
b.reverse()
print(''.join((str(i) for i in a + b)))


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
s = ins()
print(s + s[::-1])


given = input()
result = [c for c in given]
for letter in reversed(given):
	result.append(letter)
print(''.join(result))


import sys
subStr = sys.stdin.readline().strip()
print(subStr + subStr[::-1])


n = input()
m = n[::-1]
print(n + m)


n = input()
z = ''
for i in range(len(n) - 1, -1, -1):
	z += n[i]
print(n + z)


s = input()
print(s + ''.join((s[-i - 1] for i in range(len(s)))))


ar = input()
abu = len(ar) - 1
while abu > -1:
	ar += ar[abu]
	abu -= 1
print(ar)


s = input()
s = list(s)
b = s[:]
b.reverse()
for i in range(len(b)):
	s.append(b[i])
print(''.join(s))


x = input().strip()

def test_3(x):
	return x + x[::-1]
aa = test_3(x)
print(aa)


tr = input()
print(tr + tr[::-1])


A = input()
print(A, end='')
print(A[::-1])


import sys
import math
import bisect

def main():
	s = input()
	print(s + s[::-1])
main()


s = input().strip()
print(s + s[::-1])


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	s = S()
	return s + s[::-1]
print(main())


import getpass
import sys
import math
import functools
import string

def ria():
	return [int(i) for i in input().split()]
files = True
if getpass.getuser() == 'frohenk' and files:
	sys.stdin = open('test.in')
st = input()
for i in range(len(st) - 1, -1, -1):
	st += st[i]
print(st)
sys.stdout.close()


IL = lambda : list(map(int, input().split()))
I = lambda : int(input())
s = input()
print(s + s[::-1])


st = str(input())
print(st, end='')
for i in range(len(st) - 1, -1, -1):
	print(st[i], end='')


s = str(input())
rev = s[::-1]
print(s + rev)


s = input()
print(s, s[::-1], sep='')


str = input()
print(str + ''.join(reversed(str)))


str = input()
print(str + str[::-1])


a = input()
b = ''
for i in range(len(a)):
	b = a[i] + b
print(a + b)


def I():
	return int(input())

def IL():
	return [int(i) for i in input().split()]

def IM():
	return map(int, input().split())

def IS():
	return input()
s = IS()
print(s + s[::-1])


import sys
import os
import math
import re
s = input()
s += s[::-1]
print(s)


line = input()
output = line + line[::-1]
print(output)


a = list(input())
b = ''
for i in a:
	b += i
a.reverse()
for i in a:
	b += i
print(b)


A = input()
print('{}{}'.format(A, A[::-1]))


A = input().strip()
print(A + A[::-1])


a = input().strip()
b = list(a[:])
b.reverse()
print(a + ''.join(b))


from math import sqrt

def main():
	d = input()
	print(d + ''.join(reversed(d)))
main()


n = input()
r = n + n[::-1]
print(r)


import sys, math
input = sys.stdin.readline
L = lambda : list(map(int, input().split().strip()))
M = lambda : map(int, input().split())
n = input().strip()
print(n + n[-1::-1])


a = input().strip()
print(a, a[::-1], sep='')


def superpalindrom(s):
	return s + s[::-1]
print(superpalindrom(input()))


given = input()
print(given, given[::-1], sep='')


s = input()
print(s, *reversed(s), sep='')


from sys import stdin, stdout
from random import randrange
s = stdin.readline().strip()
stdout.write(s + s[::-1])


import sys
s = sys.stdin.read().strip()
print(s + s[::-1])


s = input()
k = s[::-1]
print(s + k)


a = str(input())
print(a + ''.join(reversed(a)))


import sys
from itertools import permutations
s = str(input())
sr = s[::-1]
print(s + sr)


s = list(input())
t = s.copy()
t.reverse()
s = s + t
print(*[x for x in s], sep='')


s = input()
s2 = s
print(s + s2[::-1])


n = str(input())
print(n, end='')
l = len(n)
for i in range(l):
	print(n[l - i - 1], end='')


s = input()
p = ''
for i in s:
	p = i + p
print(s + p)


def main():
	a = input()
	print(a + a[::-1])
t = 1
for i in range(t):
	main()


a = input()
t = a
a = ' '.join(a)
a = a.split()
a.reverse()
print(t + ''.join(a))


read = lambda : map(int, input().split())
s = input()
print(s + s[::-1])


n = list(input())
ans = ''
for i in range(len(n)):
	ans += n[i]
n.reverse()
for i in range(len(n)):
	ans += n[i]
print(ans)


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	a = input()
	print(a + a[::-1])

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


a = input()
b = ''.join(reversed(a))
print(a + b)


s1 = list(input())
s2 = s1[::-1]
print(''.join(s1) + ''.join(s2))


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	s = input()
	print(s + s[::-1])
for _ in range(1):
	solve()


s = input()
t = s[::-1]
print(s, t, sep='')


a = input()
S = []
print(a, end='')
for i in a:
	S.append(i)
for i in range(len(S) - 1, -1, -1):
	print(S[i], end='')


s = input()
b = list(s)
b.reverse()
d = ''.join(b)
print(s + d)


st = input()
i = ''
for j in range(len(st) - 1, -1, -1):
	i += st[j]
print(st + i)


import sys, math
f = sys.stdin
s = f.readline().strip()
print(s + s[::-1])


x = input()
print(x + ''.join([x[_] for _ in range(len(x) - 1, -1, -1)]))


N = input()
print(N[:] + N[::-1])


s = input().strip()
print(s, s[::-1], sep='')


s = list(input())
l = s[::-1]
print(''.join(s + l))


str = input()
length = len(str)
for i in range(length - 1, -1, -1):
	str += str[i]
print(str)


s = str(input())
l = list(s)
ll = l + l[::-1]
ss = ''.join(ll)
print(ss)


a = input()
if len(a) * 2 <= 10 ** 4:
	print(a + a[::-1])
else:
	print(a)


(z, zz, dgraphs, mod) = (input, lambda : list(map(int, z().split())), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
l = z()
print(l + l[::-1])


s = input()
n = len(s)
c = [0 for i in range(2 * len(s))]
for i in range(len(s)):
	c[i] = s[i]
	c[2 * n - i - 1] = s[i]
print(''.join(c))


s = input()
m = ' '.join(s).split()
n = ''
m = list(reversed(m))
for i in range(0, len(s)):
	n = n + m[i]
print(s + n)


x = input()
a = len(x) - 1
while 0 <= a:
	x = x + x[a]
	a -= 1
print(x)


s = input()
s = list(s)
length = len(s)
if length < 5000:
	for i in range(length):
		s.append(s[length - 1 - i])
	print(''.join(s))
else:
	print(s)


def reversed_list(l, start, end):
	if start >= end:
		return l
	(l[start], l[end]) = (l[end], l[start])
	return reversed_list(l, start + 1, end - 1)

def main_function():
	s = list(input())
	k = s.copy()
	return ''.join(s + reversed_list(k, 0, len(s) - 1))
print(main_function())


from pathlib import Path
import sys
import functools
import itertools
import re

def solve():
	s = str(input())
	print(s, s[::-1], sep='')

def main():
	if Path('test.inp').exists():
		sys.stdin = open('test.inp', 'r')
	solve()
main()


given = input()
result = [c for c in given] + [c for c in reversed(given)]
print(''.join(result))