#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
vector<char> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n / 4; i++) {
    int a[3] = {};
    a[s[2 * i] - 'a']++;
    a[s[2 * i + 1] - 'a']++;
    a[s[n - 1 - 2 * i] - 'a']++;
    a[s[n - 1 - 2 * i - 1] - 'a']++;
    for (int k = 0; k < 3; k++) {
      if (a[k] >= 2) {
        v.push_back(k + 'a');
        break;
      }
    }
  }
  char bonus = 0;
  if (n % 4) bonus = s[n / 4 * 2];
  for (int i = 0; i < v.size(); i++) cout << v[i];
  if (bonus) cout << bonus;
  for (int i = v.size() - 1; i >= 0; i--) cout << v[i];
}
