#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, MOD = 1e9 + 7;
char second[N];
vector<char> t;
int n;
string s;
int main() {
  scanf("%s", second + 1);
  n = strlen(second + 1);
  for (int l = 2, r = n - 1; l < r; l += 2, r -= 2) {
    for (char ch : {'a', 'b', 'c'}) {
      if ((second[l] == ch || second[l - 1] == ch) &&
          (second[r] == ch || second[r + 1] == ch)) {
        t.push_back(ch);
        break;
      }
    }
  }
  for (char c : t) printf("%c", c);
  if ((int)t.size() * 2 < n / 2) printf("%c", second[n / 2 + 1]);
  reverse(t.begin(), t.end());
  for (char c : t) printf("%c", c);
  printf("\n");
  return 0;
}
