#include <cstdio>

int s[1234567];

int main() {
  freopen("ragnarok.in", "r", stdin);
  freopen("ragnarok.out", "w", stdout);
  int c = getchar();
  while (c <= 32) c = getchar();
  int n = 0;
  while (c > 32) {
    s[n++] = c;
    c = getchar();
  }
  for (int i = n - 1; i >= 0; i--) {
    bool ok = true;
    for (int j = 0, k = i; j < k; j++, k--) {
      if (s[j] != s[k]) {
        ok = false;
        break;
      }
    }
    if (ok) {
      for (int j = i + 1; j < n; j++) putchar(s[j]);
      for (int j = 0; j < n; j++) putchar(s[j]);
      puts("");
      return 0;
    }
    ok = true;
    for (int j = n - 1, k = n - i - 1; j > k; j--, k++) {
      if (s[j] != s[k]) {
        ok = false;
        break;
      }
    }
    if (ok) {
      for (int j = 0; j < n; j++) putchar(s[j]);
      for (int j = n - i - 2; j >= 0; j--) putchar(s[j]);
      puts("");
      return 0;
    }
  }
}