#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b = "";
  cin >> a;
  int z = a.size() - 1;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != a[a.size() - 1]) {
      b += a[i];
    } else {
      if (i != a.size() - 1) {
        a.erase(a.begin() + a.size() - 1);
        b += a[i];
      }
    }
  }
  reverse(b.begin(), b.end());
  cout << a << b;
  return 0;
}
