Problem: 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 104. 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 104.

Input

First line contains a string A (1 ≤ |A| ≤ 103) 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 104. 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.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
vector<string> tim;
void rec() {
  bool f = false;
  for (int i = 0; i < tim.size(); i++) {
    for (int j = i + 1; j < tim.size(); j++) {
      if (tim[i].size() == tim[j].size()) {
        int kol = 0;
        int kolr = 0;
        int tot = 0;
        int pos;
        for (int k = 0; k + 2 < tim[i].size(); k += 3) {
          if (tim[i][k + 2] == tim[j][k + 2]) {
            if (tim[i][k] == tim[j][k]) {
              kolr++;
            } else {
              pos = k;
              kol++;
            }
          }
          tot++;
        }
        if (kol == 1 && kolr == tot - 1) {
          string tmp = tim[i];
          string nw = tim[i].substr(0, pos);
          nw += tim[i].substr(pos + 3, tim[i].size() - pos - 3);
          tim.erase(tim.begin() + j);
          tim.erase(tim.begin() + i);
          if (nw.size() > 0) {
            tim.push_back(nw);
          }
          rec();
          return;
        }
      } else if (tim[i].size() < tim[j].size()) {
        int r = 0;
        for (int l = 0; r < tim[i].size() && l < tim[j].size(); l += 3) {
          if (tim[i][r + 2] == tim[j][l + 2] && tim[i][r] == tim[j][l]) {
            r += 3;
          }
        }
        if (r == tim[i].size()) {
          string tmp = tim[j];
          tim.erase(tim.begin() + j);
          rec();
          return;
        }
      } else if (tim[j].size() < tim[i].size()) {
        int r = 0;
        for (int l = 0; r < tim[j].size() && l < tim[i].size(); l += 3) {
          if (tim[j][r + 2] == tim[i][l + 2] && tim[j][r] == tim[i][l]) {
            r += 3;
          }
        }
        if (r == tim[j].size()) {
          string tmp = tim[i];
          tim.erase(tim.begin() + i);
          rec();
          return;
        }
      }
    }
  }
  return;
}
vector<vector<string> > ans;
vector<string> res;
int len = -1;
vector<vector<string> > dat;
bool cmp(int a, int b) { return b < a; }
void real_talk() {
  if (dat.size() == 0) {
    tim = res;
    rec();
    int sum = 0;
    for (int i = 0; i < tim.size(); i++) {
      sum += tim[i].size();
    }
    if (sum < len || len == -1) {
      ans.clear();
      ans.push_back(tim);
      len = sum;
    } else if (sum == len) {
      ans.push_back(tim);
    }
    return;
  }
  for (int i = 0; i < dat.size(); i++) {
    vector<pair<int, vector<string> > > add;
    vector<int> del;
    add.push_back(make_pair(i, dat[i]));
    del.push_back(i);
    for (int k = 0; k < dat[i].size(); k++) {
      res.push_back(dat[i][k]);
    }
    for (int j = 0; j < dat.size(); j++) {
      if (i == j) continue;
      bool f = false;
      for (int p = 0; p < dat[i].size() && !f; p++) {
        for (int q = 0; q < dat[j].size() && !f; q++) {
          if (dat[i][p] == dat[j][q]) {
            add.push_back(make_pair(j, dat[j]));
            del.push_back(j);
            f = true;
            break;
          }
        }
      }
    }
    sort(del.begin(), del.end(), cmp);
    sort(add.begin(), add.end());
    for (auto u : del) {
      dat.erase(dat.begin() + u);
    }
    real_talk();
    for (auto u : add) {
      dat.insert(dat.begin() + u.first, u.second);
    }
    for (int k = 0; k < dat[i].size(); k++) {
      res.pop_back();
    }
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string a;
  cin >> a;
  cout << a;
  reverse(a.begin(), a.end());
  cout << a;
}