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.

Source: codeforces | Difficulty: EASY
Tags: Constructive algorithms


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


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


a = input()
while True:
	if a == a[::-1] and len(a) < 10000:
		print(a)
		break
	else:
		a = a + a[::-1]


import sys
s = input()
if s == s[::-1]:
	print(s)
	sys.exit()
print(s + s[::-1])


__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()


a = input()
b = ''
n = len(a)
i = -1
while i >= -n:
	b += a[i]
	i = i - 1
if a == b:
	print(a)
else:
	for i in a:
		print(i, end='')
	i = 0
	while i < len(b):
		if i == 0:
			pass
		else:
			print(b[i], end='')
		i = i + 1
	print()


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


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


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


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]))


def ispalindrome(s):
	return s == s[-1::-1]
A = input()
if ispalindrome(A):
	print(A)
elif len(A) <= 10 ** 4 / 2:
	print(A + A[-1::-1])
else:
	n = len(s)
	p1 = n - [ispalindrome(s[:i]) for i in range(n, 0, -1)].index(True)
	p2 = n - [ispalindrome(s[i:]) for i in range(1, n)].index(True) - 1
	if p1 > p2:
		print(s[p1:] + s)
	else:
		print(s + s[n - p2 - 1::-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 isPal(s):
	for i in range(len(s) // 2):
		if s[i] != s[len(s) - i - 1]:
			return False
	return True
s = input().strip()
if isPal(s):
	print(s)
else:
	print(s + s[::-1])


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


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


class CodeforcesTask932ASolution:

	def __init__(self):
		self.result = ''
		self.a = ''

	def read_input(self):
		self.a = input()

	def process_task(self):
		self.result = self.a + self.a[::-1][1:]

	def get_result(self):
		return self.result
Solution = CodeforcesTask932ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


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])


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


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


t = input()
rev = ''.join(reversed(t))
if t == rev:
	print(t)
else:
	print(t + rev)


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


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


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


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


line = input()
pal = line
for i in range(len(line) - 2, -1, -1):
	pal += line[i]
print(pal)


def isP(s):
	return s == s[::-1]
x = list(input())
k = x.copy()
el = 1
while el <= len(x) and (not isP(k)):
	k.append(x[len(x) - el - 1])
	el += 1
print(''.join(k))


s = input()
temp = s[0:-1]
temp1 = list(temp)
temp1.reverse()
s = list(s)
x = s + temp1
print(''.join(x))


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()
if a == a[::-1]:
	print(a)
else:
	x = a[1:10 ** 4]
	b = x[::-1] + a
	print(b)


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


inp = list(map(str, input()))
output = ''
s = len(inp)
a = int(s / 2)
flag = 1
for i in range(a):
	if inp[0 + i] != inp[s - 1 - i]:
		flag = 0
		break
if flag == 0:
	for i in range(0, 2 * s):
		if i < s:
			output = output + inp[i]
		else:
			output = output + inp[s - i - 1]
else:
	for i in range(s):
		output = output + inp[i]
print(output)


import sys
for line in sys.stdin:
	if line == None or line == '\n':
		break
	(first, last) = (0, len(line) - 1)
	is_palin = True
	while first < last:
		if line[first] != line[last]:
			is_palin = False
			break
		first += 1
		last -= 1
	if is_palin:
		print(line)
		continue
	str_builder = ''
	for i in range(len(line) - 1, -1, -1):
		str_builder += line[i]
	print(str_builder + line)


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


a = input()
b = list(a)
if list(a) != list(reversed(a)):
	for i in range(len(a)):
		b.insert(len(a), a[i])
		if b == list(reversed(b)):
			break
	for e in b[:-1]:
		print(e, end='')
	print(b[-1])
else:
	print(a)


def is_palindrome(string):
	length = len(string)
	if length % 2 == 0:
		l_half = string[int(length / 2):]
		if string[:int(length / 2)] == l_half[::-1]:
			return True
		else:
			return False
	else:
		l_half = string[int(length / 2):]
		if string[:int(length / 2) + 1] == l_half[::-1]:
			return True
		else:
			return False

def is_subsequence(string1, string2):
	for sub in string1:
		index = string2.find(sub)
		if index != -1:
			string2 = string2[index:]
		else:
			return False
	return True
string1 = input()
if is_palindrome(string1):
	print(string1)
else:
	print(string1 + string1[::-1])


s = [c for c in input()]
n = len(s) - 1
i = 0
while i <= n // 2:
	if s[n - i] != s[i]:
		s.insert(n - i + 1, s[i])
		n += 1
	i += 1
res = ''
for c in s:
	res += c
print(res)


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


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


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


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


def isPalindrom(s):
	s_len = len(s)
	if s_len == 1:
		return (True, 0)
	else:
		mid_pt = s_len // 2
		for i in range(mid_pt):
			if s[i] != s[s_len - i - 1]:
				return (False, i)
		return (True, 0)
s = list(input())
(is_palin, idx) = isPalindrom(s)
while not is_palin:
	s.insert(len(s) - idx, s[idx])
	(is_palin, idx) = isPalindrom(s)
print(''.join(s))


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


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


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


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))


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


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


def line_is_palindrome(input_line):
	for i in range(0, len(input_line) // 2):
		if input_line[i] != input_line[-(i + 1)]:
			return False
	return True

def get_lenght_base_palindrome(input_line):
	i = 0
	while True:
		if input_line[i] != input_line[-(i + 1)]:
			return i
		i += 1

def create_palindrome(input_line, length_base_palindrome):
	if length_base_palindrome != 0:
		none_palindrome_subline = input_line[length_base_palindrome:-(length_base_palindrome + 1)]
		return input_line[:length_base_palindrome] + none_palindrome_subline + none_palindrome_subline[::-1] + input_line[:length_base_palindrome]
	return input_line + input_line[::-1]

def main():
	input_line = input()
	if line_is_palindrome(input_line):
		return input_line
	length_base_palindrome = get_lenght_base_palindrome(input_line)
	return create_palindrome(input_line, length_base_palindrome)
print(main())


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)))


a = input()
b = a[:-1]
b = list(b)
while a != a[::-1]:
	a += b.pop()
print(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)


a = input()
(a1, c) = (a[::-1], -1)
if a == a1:
	print(a)
	quit()
for i in range(len(a)):
	if a[i:] == a1[:-i]:
		c = i
		break
if c == -1:
	print(a + a1)
	quit()
print(a + a[:c][::-1])


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


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


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


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


def is_palindrome(str):
	return str == str[::-1]
ins = input()
ans = ''
i = len(ins) - 1
while not is_palindrome(ans + ins):
	ans += ins[i]
	i -= 1
print(ans + ins)


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()


s = input()
if s == s[::-1]:
	print(s)
else:
	s1 = list(s)
	s1.reverse()
	s1 = ''.join(s1)
	print(s, end='')
	print(s1)


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())


a = input()

def control(x):
	return x == x[::-1]
a_len = len(a)
mid1 = list(a[0:a_len // 2])
mid2 = list(a[a_len // 2 + a_len % 2:])
mid2 = mid2[::-1]
ind = 0
mid1_len = len(mid1)
mid2_len = len(mid2)
while 1:
	if mid1 == mid2 and ind >= mid1_len:
		break
	if mid1_len >= mid2_len:
		mid2.insert(ind, mid1[ind])
		mid2_len += 1
	else:
		mid1.insert(ind, mid2[ind])
		mid1_len += 1
	ind += 1
f = ''.join(mid1 + list(a[a_len // 2:a_len // 2 + a_len % 2]) + mid2[::-1])
print(f)


def rev(s):
	b = []
	for elem in reversed(s):
		b.append(elem)
	return b
a = input()
res = []
for char in a:
	res.append(char)
if rev(res) == res:
	for elem in res:
		print(elem, end='')
else:
	for i in range(len(res)):
		if rev(res) == res:
			break
		else:
			l = len(res)
			res.append(res[l - 2 * i - 2])
	for elem in res:
		print(elem, end='')


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='')


s = input()
s1 = s[::-1]
if s == s1:
	print(s)
else:
	s1 = ''
	i = len(s)
	x = s[:i - 1]
	x = x[::-1]
	s1 = s + x
	print(s1)


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])


s = list(input())
r = s.copy()
r.reverse()
print(''.join(s + r[1:]))


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


from collections import deque
s = input()

def IsPall(s):
	valid = True
	for i in range(len(s)):
		if s[i] != s[len(s) - 1 - i]:
			valid = False
			break
	return valid
if IsPall(s):
	print(s)
else:
	left = s[0:-1]
	right = left[::-1]
	print(left + s[-1] + right)


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


a = input()
i = 0
ans = ''
while i < len(a) // 2:
	if a[i] != a[len(a) - 1 - i]:
		break
	elif i == len(a) // 2 - 1:
		ans = a
	i += 1
if ans != a:
	ans = a + a[::-1]
print(ans)


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='')


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


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


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


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


s = input()
if s == ''.join(reversed(s)):
	print(s)
else:
	print(s + ''.join(reversed(s[:-1])))


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


a = input()
b = ''
c = ''
i = 0
j = len(a) - 1
p = len(a) - 1
k = len(a)
pali = True
while i < k // 2:
	if a[i] != a[j]:
		pali = False
	i += 1
	j -= 1
if pali == False:
	while p >= 0:
		c = c + a[p]
		p -= 1
b = a + c
if pali:
	print(a)
else:
	print(b)


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='')


s = list(input())
k = s.copy()
k.reverse()
if s == k:
	print(''.join(s))
else:
	k = s[:len(s) - 1]
	k.reverse()
	s.extend(k)
	print(''.join(s))


import math
text = input()
if text[math.ceil(len(text) / 2):][::-1] == text[:len(text) // 2]:
	print(text)
else:
	print(text + text[::-1])


a = input()
l = list(a)
print(a, end='')
for i in range(len(l) - 2, -1, -1):
	print(l[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])


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


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)


def isPal(s):
	return s == s[::-1]
s = input().strip()
if isPal(s):
	print(s)
else:
	print(s + s[::-1])


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])


from __future__ import division, print_function
import math
import os
import sys
from io import BytesIO, IOBase

def palindromo(mot):
	for n in range(math.ceil(len(mot) / 2)):
		if mot[n] == mot[-1 - n]:
			pass
		else:
			return False
	return True
palabra = input()
palabra2 = palabra
if palindromo(palabra):
	print(palabra)
else:
	for n in range(len(palabra) - 1):
		palabra2 = palabra2 + palabra[-n - 2]
	print(palabra2)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	pass
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def pal(s):
	if s == s[::-1]:
		return 1
	else:
		return 0
k = input()
if pal(k) == 1:
	print(k)
else:
	print(k + k[::-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())


a = list(input())
a.extend(a[len(a) - 2::-1])
for i in a:
	print(i, end='')


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


s = input()
s = list(s)
l = len(s)
for i in range(l):
	if s[i] != s[l - i - 1]:
		s.insert(l - i, s[i])
		l += 1
print(''.join(s))


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()


s = str(input())

def p(s):
	if s == s[::-1]:
		return s
	else:
		x = s[0:len(s) - 1][::-1]
		return s + x
print(p(s))


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


A = input()
b = list()

def rev(A):
	return A[::-1]
C = rev(A)
for e in range(0, len(A)):
	b.append(A[e])
if A == C:
	print(A)
else:
	for i in range(1, len(C)):
		b.append(C[i])
	strb = ''.join((str(x) for x in b))
	print(strb)


import sys
from math import sqrt, floor, factorial
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def solve():
	s = inp().strip()
	ans = ''
	(i, j) = (0, len(s) - 1)
	while i < j:
		if s[i] == s[j]:
			ans += s[j]
			j -= 1
			i += 1
		else:
			ans += s[j]
			j -= 1
	ans += s[i:]
	print(ans)
solve()


def palindrom(x):
	f = 0
	while True:
		if x[f] == x[-f - 1]:
			f += 1
		else:
			return f
		if f == len(x) // 2:
			return 'true'
inp = input()
while palindrom(inp) != 'true':
	inp = inp[:len(inp) - palindrom(inp)] + inp[palindrom(inp)] + inp[-palindrom(inp) + len(inp):]
print(inp)


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


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)))


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


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


s = input()
print('zrmtcl' + s + s[::-1] + 'lctmrz')


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


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


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


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


s = input()
s1 = s[::-1]
if s1 == s:
	print(s)
else:
	p = s[:-1]
	p = p[::-1]
	s2 = s + p
	print(s2)


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)


string = list(input())
z = string[::-1]
if z == string:
	print(''.join(z))
else:
	lst = string[0:len(string) - 1]
	lst = lst[::-1]
	string += lst
	z = string.reverse()
	print(''.join(string))


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='')


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


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


A = str(input())
x = len(A)
i = 0
x = x - 1
k = 0
while x - i >= i:
	if A[x - i] == A[i]:
		i += 1
	else:
		k = 1
		break
if k == 1:
	B = A + A[::-1]
	print(B)
else:
	print(A)


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


def f(s):
	if s == s[::-1]:
		return True
	return False
str = input()
if f(str):
	print(str)
else:
	print(str + str[::-1])


import math

def palindromo(mot):
	for n in range(math.ceil(len(mot) / 2)):
		if mot[n] == mot[-1 - n]:
			pass
		else:
			return False
	return True
palabra = input()
palabra2 = palabra
if palindromo(palabra):
	print(palabra)
else:
	for n in range(len(palabra) - 1):
		palabra2 = palabra2 + palabra[-n - 2]
	print(palabra2)


a = input()
s = ''
s += a
a = list(a)
del a[-1]
a.reverse()
a = ''.join(a)
s += a
print(s)


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


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])


a = input()
li1 = list(a)
li1.insert(-1, 'x')
in1 = ''.join((i for i in li1))
print(in1 + in1[::-1])


s = input()
t = list(reversed(s))
a = ''
for i in range(len(t)):
	a = a + t[i]
if a == s:
	print(a)
else:
	print(a + s)


def pikachu(a, c, n):
	prefixes = [a[0:i + 1] for i in range(n + 1)]
	suffixes = [a[i:n + 1] for i in range(n + 1)]
	maxi = 0
	for i in range(n // 2):
		for j in suffixes:
			if prefixes[i] == j:
				maxi = i + 1
	ans = c[maxi:][::-1] + c
	l = len(ans)
	return (ans, l)
a = input()
c = a
b = a[::-1] + '#' + a
a = a + '#' + a[::-1]
n = len(c * 2)
x = pikachu(a, c, n)
c = c[::-1]
y = pikachu(b, c, n)
if x[1] < y[1]:
	print(x[0])
else:
	print(y[0])


a = input()

def check_polindrom(a):
	for i in range(int(len(a) / 2)):
		if a[i] != a[len(a) - 1 - i]:
			return False
	return True
if check_polindrom(a):
	print(a)
elif len(a) * 2 < 10000:
	a += a[::-1]
	print(a)


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


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


x = input()
r = x[::-1]
if r == x:
	print(x)
else:
	a = x[1:]
	new = a[::-1] + x
	print(new)


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='')


w = input()
i = 0
n = len(w)
o = n - 1
f = True
b = w[::-1]
while i <= n // 2:
	if w[i] == w[o]:
		i += 1
		o -= 1
		f = True
	else:
		f = False
		break
if f == True:
	print(w)
else:
	a = w + b
	print(a)


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


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()


import difflib

def main():
	A = input()
	rev = A[::-1]
	print(A + rev[1:])
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 = input('')
m = n[::-1]
if n == m:
	print(n)
else:
	print(n + m)


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)


def is_palindrome(input):
	if len(input) == 0:
		return False
	for i in range(int(len(input) / 2)):
		if not input[i] == input[len(input) - 1 - i]:
			return False
	return True
in_string = input()
curr_string = in_string
index = len(curr_string) - 2
while index >= 0 and (not is_palindrome(curr_string)):
	curr_string += in_string[index]
	index -= 1
print(curr_string)


t = input()
s = t[::-1]
f = True
for i in range(len(t)):
	if s[i] != t[i]:
		f = False
		break
if f:
	print(t)
else:
	print(t + s)


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)


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


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 = list(input())
(i, j) = (0, len(s) - 1)
while i < j:
	if s[i] == s[j]:
		i += 1
		j -= 1
	else:
		s.insert(j + 1, s[i])
		i += 1
print(''.join(s))


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


t = input()
n = len(t)

def check_pal(st, n):
	for i in range(int(n / 2)):
		if st[i] != st[n - i - 1]:
			return construct_pal(st, n)
	return st

def construct_pal(st, n):
	ans = st
	if n <= 5000:
		for i in range(n):
			ans += st[n - i - 1]
		return ans
	return
print(check_pal(t, n))


def test(s):
	(l, r) = (0, len(s) - 1)
	while l < r and s[l] == s[r]:
		l += 1
		r -= 1
	return l >= r
s = input()
if test(s):
	print(s)
else:
	print(s + s[:len(s) - 1][::-1])


s = input()
d = {}
for i in s:
	d[i] = 0
for i in s:
	d[i] = d[i] + 1
count = 0
for (i, j) in d.items():
	if j % 2 == 1:
		count = count + 1
	if count > 1:
		break
p = [0] * len(s)
pk = 0
ok = 0
for i in range(int(len(s) / 2)):
	if s[pk] != s[-(pk + 1)]:
		ok = 1
		break
	pk = pk + 1
if ok == 0:
	print(s)
else:
	m = reversed(s)
	m = list(m)
	m = ''.join(m)
	print(s, m, sep='')


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


a = input()
l = 0
if a == a[::-1]:
	print(a)
else:
	for i in range(len(a) - 1, -1, -1):
		d = a + a[i:]
		if d == d[::-1]:
			l = 1
			print(d)
			break
	if l == 0:
		print(a + a[len(a) - 1::-1])


b = input()
n = len(b)
a = b
i = 0
j = n - 1
while i <= j:
	if b[i] == b[j]:
		i += 1
		j -= 1
	else:
		b = b[:i] + b[j] + b[i:]
		i += 1
print(b)


import sys

def main():
	s = input()
	t = 'a' if len(s) % 2 == 1 else ''
	print(s + t + s[::-1])
main()


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)


s = input()
n = len(s)
(i, j) = (0, n - 1)
c = []
while i <= j:
	c.append(s[i])
	if s[i] != s[j]:
		c.append(s[j])
	i += 1
	j -= 1
print(''.join(c) + ''.join(reversed(c)))


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


def is_palin(inp):
	return inp == inp[::-1]

def generate(inp):
	if not inp:
		return ''
	return inp[0] + generate(inp[1:]) + inp[0]
a = input()
if is_palin(a):
	print(a)
else:
	print(generate(a))


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


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


s = input()
n = len(s)
s2 = s
if n % 2 == 0:
	for i in range(n - 1, -1, -1):
		s2 += s[i]
else:
	for i in range(n - 2, -1, -1):
		s2 += s[i]
print(s2)


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


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


s = input()
b = ''
(i, j) = (0, len(s) - 1)
while i < j:
	if s[i] == s[j]:
		j -= 1
	b = s[i] + b
	i += 1
print(s[:i + 1] + b)


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


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


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


a = input()
a1 = []
a2 = []
for i in a:
	a1.append(i)
	a2.append(i)
a2.reverse()
if a1 == a2:
	print(a)
else:
	a3 = a1 + a2
	print(*a3, sep='')


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)


s = input()
k = [i for i in s]
if s == s[::-1]:
	print(s)
else:
	print(s + s[::-1])


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


A = input()
l = len(A)
if l % 2 == 1:
	a1 = A[0:l // 2]
	mid = A[l // 2]
	a2 = A[l // 2 + 1:]
	ans = a1 + a2[::-1] + mid + a2 + a1[::-1]
else:
	a1 = A[0:l // 2]
	a2 = A[l // 2:]
	ans = a1 + a2[::-1] + a2 + a1[::-1]
print(ans)


st = input()
i = 0
s = ''
l = list(st)
rev = list(reversed(l))
b = rev[1:]
for _ in b:
	s += _
for i in range(len(l)):
	if len(l) == 1:
		print('a', st, 'a', sep='')
		exit()
	elif len(l) >= 2:
		if l == rev:
			print('a', st, 'a', sep='')
			exit()
		else:
			l.append(s)
			break
print(*l, sep='')


(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))


actual = str(input())
rev = actual[::-1]
if actual == rev:
	print(actual)
else:
	substr = actual[:-1]
	substr = substr[::-1]
	print(actual + substr)


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()
n = len(s)
i = 0
pos = 0
while i < n:
	if s[i:] == s[i:][::-1]:
		pos = i
		break
	i += 1
print(s + s[:pos][::-1])


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))


a = input()
b = list()
for i in range(len(a)):
	b.append(a[i])
r = len(a) - 1
for i in range(len(a)):
	if a[i] != a[r - i]:
		b.insert(r - i, a[i])
res = ''
for i in range(len(b)):
	res += b[i]
print(res)


a = input()
b = ''
for i in range(len(a) - 1, -1, -1):
	b += a[i]
if a == b:
	print(a)
else:
	print(a + b)