import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); char[] inputs = sc.next().toCharArray(); for (int i = 0; i < inputs.length; i++) { boolean enable = true; char[] ans = new char[inputs.length + i]; int left = 0; int right = inputs.length - 1 + i; while (left <= right && enable) { enable = right >= inputs.length || inputs[left] == inputs[right]; ans[left] = inputs[left]; ans[right] = inputs[left]; left++; right--; } if (enable) { System.out.println(ans); return; } } } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }