#include <bits/stdc++.h>
using namespace std;
deque<char> qwq;
char s[1010];
int main() {
  scanf("%s", s + 1);
  int le = strlen(s + 1);
  if (le % 2 == 0) {
    int l = (le + 1) >> 1, r = l + 1;
    for (int i = l, j = r; i >= 1, j <= le; i--, j++) {
      if (s[i] != s[j])
        qwq.push_front(s[j]), qwq.push_front(s[i]), qwq.push_back(s[j]),
            qwq.push_back(s[i]);
      else
        qwq.push_front(s[i]), qwq.push_back(s[j]);
    }
    while (!qwq.empty()) {
      char a = qwq.front();
      qwq.pop_front();
      putchar(a);
    }
  } else {
    int l = ((le + 1) >> 1) - 1, r = ((le + 1) >> 1) + 1;
    qwq.push_back(s[(le + 1) >> 1]);
    for (int i = l, j = r; i >= 1, j <= le; i--, j++) {
      if (s[i] != s[j])
        qwq.push_front(s[j]), qwq.push_front(s[i]), qwq.push_back(s[j]),
            qwq.push_back(s[i]);
      else
        qwq.push_front(s[i]), qwq.push_back(s[j]);
    }
    while (!qwq.empty()) {
      char a = qwq.front();
      qwq.pop_front();
      putchar(a);
    }
  }
}
