#include <bits/stdc++.h>
const int MAXN = 1e6 + 5;
char str[MAXN], t;
std::vector<char> out;
std::map<char, int> S;
int n;
int main() {
  scanf("%s", str + 1);
  n = strlen(str + 1);
  int l = 1, r = n;
  while (l + 3 <= r) {
    S.clear();
    S[str[l]]++;
    S[str[r]]++;
    S[str[l + 1]]++;
    S[str[r - 1]]++;
    t = S['a'] >= 2 ? 'a' : ((S['b'] >= 2 ? 'b' : 'c'));
    out.push_back(t);
    ++l;
    l++;
    --r;
    r--;
  }
  for (auto x : out) putchar(x);
  std::reverse(out.begin(), out.end());
  if (l < r) putchar(str[l]);
  for (auto x : out) putchar(x);
  puts("");
  return 0;
}
