#include <bits/stdc++.h>
using namespace std;
long long arr[2001];
int main() {
  string str;
  cin >> str;
  deque<char> f, b;
  int k = str.size() / 4;
  int arr[3];
  int s = 0, e = str.size() - 1;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < 3; j++) arr[j] = 0;
    arr[str[s] - 'a']++;
    arr[str[s + 1] - 'a']++;
    arr[str[e] - 'a']++;
    arr[str[e - 1] - 'a']++;
    s += 2;
    e -= 2;
    for (int j = 0; j < 3; j++) {
      if (arr[j] == 2) {
        f.push_back(j + 'a');
        b.push_front(j + 'a');
        break;
      }
    }
  }
  if (str.size() % 4) f.push_back(str[s]);
  for (int i = 0; i < f.size(); i++) cout << f[i];
  for (int i = 0; i < b.size(); i++) cout << b[i];
  cout << endl;
  return 0;
}
