#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
long long mpow(long long base, long long exp);
long long power(long long a, long long b);
const long long mod = 998244353;
vector<int> g[300001];
struct node {
  set<int> s;
};
struct segTree {
  long long arr[2001];
  long long res[8003];
  int idx_mx[8003];
  int operation_arr[4003];
  int NO_OPERATION = 0;
  void init(int x, int lo, int hi) {
    if (lo == hi) {
      res[x] = arr[lo];
      return;
    }
    int mid = (lo + hi) / 2;
    init(2 * x, lo, mid);
    init(2 * x + 1, mid + 1, hi);
    update_point(x);
  }
  int merge_operation(int a, int b) { return (a ^ b); }
  long long merge_results(int a, int b) { return a + b; }
  void modify(int x, int lo, int hi, int l, int r, int op) {
    prop(x, lo, hi);
    if (lo >= l && hi <= r) {
      operation_arr[x] = merge_operation(operation_arr[x], op);
      return;
    }
    int mid = (lo + hi) / 2;
    if (lo > r || hi < l) return;
    modify(2 * x, lo, mid, l, r, op);
    modify(2 * x + 1, mid + 1, hi, l, r, op);
    update(x, lo, hi);
  }
  int get_sum(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return res[x];
    if (lo > r || hi < l) return 0;
    int mid = (lo + hi) / 2;
    return get_sum(2 * x, lo, mid, l, r) +
           get_sum(2 * x + 1, mid + 1, hi, l, r);
  }
  void point_modify(int x, int lo, int hi, int pos, long long val) {
    if (lo == hi) {
      res[x] = val;
      return;
    }
    int mid = (lo + hi) / 2;
    if (pos <= mid)
      point_modify(2 * x, lo, mid, pos, val);
    else
      point_modify(2 * x + 1, mid + 1, hi, pos, val);
    update_point(x);
  }
  long long max_query(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return res[x];
    if (lo > r || hi < l) return LLONG_MIN;
    int mid = (lo + hi) / 2;
    return max(max_query(2 * x, lo, mid, l, r),
               max_query(2 * x + 1, mid + 1, hi, l, r));
  }
  long long get_idx(int x, int lo, int hi, long long v) {
    if (res[x] < v) return hi + 1;
    if (lo == hi) return lo;
    int mid = (lo + hi) / 2;
    if (res[2 * x] >= v)
      return get_idx(2 * x, lo, mid, v);
    else
      return get_idx(2 * x + 1, mid + 1, hi, v);
  }
  pair<int, int> mx_q(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return {res[x], idx_mx[x]};
    if (lo > r || hi < l) return {LLONG_MIN, -1};
    int mid = (lo + hi) / 2;
    pair<int, int> p1 = mx_q(2 * x, lo, mid, l, r);
    pair<int, int> p2 = mx_q(2 * x + 1, mid + 1, hi, l, r);
    if (p1.first > p2.first) {
      return p1;
    } else
      return p2;
  }
  int mx_idx = -1;
  void max_idx(int x, int lo, int hi, int val, int r) {
    if (res[x] < val) return;
    int mid = (lo + hi) / 2;
    if (lo > r) return;
    if (hi == lo && res[x] == val) {
      mx_idx = lo;
      return;
    }
    max_idx(2 * x, lo, mid, val, r);
    max_idx(2 * x + 1, mid + 1, hi, val, r);
  }
  int get_max_idx(int x, int lo, int hi, int val, int r) {
    max_idx(x, lo, hi, val, r);
    return mx_idx;
  }
  void update_point(int x) { res[x] = res[2 * x] + res[2 * x + 1]; }
  int query(int x, int lo, int hi, int l, int r) {
    prop(x, lo, hi);
    if (lo >= l && hi <= r) return operate(res[x], operation_arr[x], lo, hi);
    if (lo > r || hi < l) return 0;
    int mid = (lo + hi) / 2;
    return merge_results(query(2 * x, lo, mid, l, r),
                         query(2 * x + 1, mid + 1, hi, l, r));
  }
  int kth_one(int x, int lo, int hi, int k) {
    if (lo == hi) return lo;
    int v1 = res[2 * x];
    int mid = (lo + hi) / 2;
    if (k <= v1)
      return kth_one(2 * x, lo, mid, k);
    else
      return kth_one(2 * x + 1, mid + 1, hi, k - v1);
  }
  void prop(int x, int lo, int hi) {
    if (lo == hi) return;
    int mid = (hi + lo) / 2;
    long long len = mid - lo + 1;
    operation_arr[2 * x] =
        merge_operation(operation_arr[2 * x], operation_arr[x]);
    operation_arr[2 * x + 1] =
        merge_operation(operation_arr[2 * x + 1], operation_arr[x]);
    operation_arr[x] = NO_OPERATION;
    update(x, lo, hi);
  }
  int operate(int val, int operatr, int l, int r) {
    if (operatr == NO_OPERATION) return val;
    int sz = r - l + 1;
    return sz - val;
  }
  void update(int x, int lo, int hi) {
    if (lo == hi) return;
    int mid = (lo + hi) / 2;
    long long len1 = (mid - lo + 1);
    long long len2 = (hi - mid);
    res[x] = merge_results(
        operate(res[2 * x], operation_arr[2 * x], lo, mid),
        operate(res[2 * x + 1], operation_arr[2 * x + 1], mid + 1, hi));
  }
};
struct FenwickTree {
  int arr[100];
  int n;
  void update(int i, int delta) {
    while (i <= n) {
      arr[i] += delta;
      i = i + (i & (-i));
    }
  }
  int sum(int i) {
    if (i == 0) return 0;
    int res = 0;
    while (i > 0) {
      res = res + arr[i];
      i -= (i & (-i));
    }
    return res;
  }
};
struct dsu {
  int par[1001];
  int size_set[1001];
  void init(int n) {
    for (int i = 0; i <= n; i++) par[i] = i, size_set[i] = 1;
  }
  int get_par(int u) {
    vector<int> temp;
    while (par[u] != u) {
      temp.push_back(u);
      u = par[u];
    }
    for (int i : temp) par[i] = u;
    return u;
  }
  void union_set(int a, int b) {
    a = get_par(a);
    b = get_par(b);
    if (a == b) return;
    if (size_set[a] < size_set[b]) {
      int temp = a;
      a = b;
      b = temp;
    }
    par[b] = a;
    size_set[a] += size_set[b];
  }
  int get_size(int u) {
    u = get_par(u);
    return size_set[u];
  }
};
int check(string s1, string s2) {
  int n1 = s1.size();
  int n2 = s2.size();
  s1 = '$' + s1;
  s2 = '$' + s2;
  int dp[n1 + 1][n2 + 1];
  for (int j = 0; j <= n2; j++) dp[0][j] = 0;
  dp[0][0] = 1;
  for (int i = 1; i <= n1; i++) {
    dp[i][0] = 0;
  }
  int i1 = 1;
  while (i1 <= n1 && s1[i1] == '*') {
    dp[i1][0] = 1;
    i1++;
  }
  int sum[n2 + 1];
  int s = 0;
  for (int i = 0; i <= n2; i++) s = s + dp[0][i], sum[i] = s;
  for (int i = 1; i <= n1; i++) {
    for (int j = 1; j <= n2; j++) {
      char c1 = s1[i];
      char c2 = s2[j];
      if (c1 == '*') {
        if (sum[j] > 0)
          dp[i][j] = 1;
        else
          dp[i][j] = 0;
      } else if (c1 == '?') {
        dp[i][j] = dp[i - 1][j - 1];
      } else {
        if (c1 != c2)
          dp[i][j] = 0;
        else
          dp[i][j] = dp[i - 1][j - 1];
      }
    }
    s = 0;
    for (int j = 0; j <= n2; j++) {
      s += dp[i][j];
      sum[j] = s;
    }
  }
  return dp[n1][n2];
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lim = 1000000;
long long pw1[1000001];
long long pw2[1000001];
long long m1 = 1e9 + 7;
long long m2 = 1e9 + 9;
long long base = 256;
void pre_calc() {
  pw1[0] = 1;
  pw2[0] = 1;
  for (int i = 1; i <= lim; i++) {
    pw1[i] = (pw1[i - 1] * base) % m1;
    pw2[i] = (pw2[i - 1] * base) % m2;
  }
}
pair<long long, long long> string_hash(string s) {
  long long res1 = 0, res2 = 0;
  for (int i = 0; i < s.size(); i++) {
    long long v = (long long)s[i];
    res1 = (res1 + v * pw1[i]) % m1;
    res2 = (res2 + v * pw2[i]) % m2;
  }
  return make_pair(res1, res2);
}
bool isOverflow(long long a, long long b) {
  if (a == 0 || b == 0) return false;
  if (a <= LLONG_MAX / b)
    return false;
  else
    return true;
}
bool isOverflow_add(long long a, long long b) {
  long long res = a + b;
  if (res - a == b && res - b == a) return 0;
  return 1;
}
long long fact(long long i) {
  long long res = 1;
  for (int j = 1; j <= i; j++) res *= j;
  return res;
}
long long f1[5001];
long long f2[5001];
void fct() {
  f1[0] = 1;
  f2[0] = mpow(1, mod - 2);
  for (long long i = 1; i <= 5000; i++) {
    f1[i] = (f1[i - 1] * i) % mod;
    f2[i] = mpow(f1[i], mod - 2);
  }
}
long long ncr(int n, int r) {
  long long res = f1[n];
  res = (res * f2[r]) % mod;
  res = (res * f2[n - r]) % mod;
  return res;
}
int d[10000002];
long long N = (1e6 + 1);
vector<long long> pr;
void seive(int N) {
  for (int i = 2; i < N; i++) d[i] = i;
  for (long long i = 2; i < N; i++) {
    if (d[i] == i) pr.push_back(i);
    for (long long j = 0;
         j < (long long)pr.size() && pr[j] <= d[i] && i * pr[j] < N; j++)
      d[i * pr[j]] = pr[j];
  }
}
vector<pair<int, int> > fctorize(int n) {
  vector<pair<int, int> > res;
  while (n > 1) {
    int k = d[n];
    int cnt = 0;
    while (n > 1 && k == d[n]) n /= d[n], cnt++;
    res.push_back({k, cnt});
  }
  return res;
}
int odd_cnt(int cnt[]) {
  int c = 0;
  for (int i = 0; i < 26; i++) {
    if (cnt[i] % 2 == 1) c++;
  }
  return c;
}
void solve() {
  string s;
  cin >> s;
  int n = (int)s.size();
  int cnt[26];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < (int)s.size(); i++) {
    cnt[s[i] - 'a']++;
  }
  string res = "";
  if (n % 2 == 0) {
    int v = 0;
    while (odd_cnt(cnt) > 0) {
      bool b1 = 1;
      for (int i = 0; i < 26 && b1; i++) {
        for (int j = 25; j >= 0 && b1; j--) {
          if (cnt[i] % 2 == 1 && cnt[j] % 2 == 1) {
            cnt[i]++, cnt[j]--;
            b1 = 0;
            break;
          }
        }
      }
    }
    for (int i = 0; i < 26; i++) {
      for (int j = 1; j <= cnt[i] / 2; j++) res = res + (char)(i + 'a');
    }
    cout << res;
    for (int i = (int)res.size() - 1; i >= 0; i--) cout << res[i];
  } else {
    while (odd_cnt(cnt) > 1) {
      for (int i = 0; i < 26; i++) {
        for (int j = 25; j > i; j--) {
          if (cnt[i] % 2 == 1 && cnt[j] % 2 == 1) {
            cnt[i]++;
            cnt[j]--;
          }
        }
      }
    }
    int pos = -1;
    for (int i = 0; i < 26; i++) {
      if (cnt[i] % 2 == 1) {
        pos = i;
      }
    }
    for (int i = 0; i < 26; i++) {
      for (int j = 1; j <= cnt[i] / 2; j++) res += (char)(i + 'a');
    }
    int end = (int)res.size() - 1;
    res += (char)(pos + 'a');
    for (int i = end; i >= 0; i--) res += res[i];
    cout << res << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
long long mpow(long long base, long long exp) {
  base %= mod;
  long long result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b % 2 == 0) {
      b /= 2;
      if (isOverflow(a, a)) return LLONG_MAX;
      a = a * a;
    } else {
      if (isOverflow(res, a)) return LLONG_MAX;
      res = res * a;
      b--;
    }
  }
  return res;
}

### Prompt

Your challenge is to write a CPP solution to the following problem:

A string is called palindrome if it reads the same from left to right and from right to left. For example "kazak", "oo", "r" and "mikhailrubinchikkihcniburliahkim" are palindroms, but strings "abb" and "ij" are not.

You are given string s consisting of lowercase Latin letters. At once you can choose any position in the string and change letter in that position to any other lowercase letter. So after each changing the length of the string doesn't change. At first you can change some letters in s. Then you can permute the order of letters as you want. Permutation doesn't count as changes. 

You should obtain palindrome with the minimal number of changes. If there are several ways to do that you should get the lexicographically (alphabetically) smallest palindrome. So firstly you should minimize the number of changes and then minimize the palindrome lexicographically.

Input

The only line contains string s (1 ≤ |s| ≤ 2·105) consisting of only lowercase Latin letters.

Output

Print the lexicographically smallest palindrome that can be obtained with the minimal number of changes.

Examples

Input

aabc


Output

abba


Input

aabcd


Output

abcba

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
long long mpow(long long base, long long exp);
long long power(long long a, long long b);
const long long mod = 998244353;
vector<int> g[300001];
struct node {
  set<int> s;
};
struct segTree {
  long long arr[2001];
  long long res[8003];
  int idx_mx[8003];
  int operation_arr[4003];
  int NO_OPERATION = 0;
  void init(int x, int lo, int hi) {
    if (lo == hi) {
      res[x] = arr[lo];
      return;
    }
    int mid = (lo + hi) / 2;
    init(2 * x, lo, mid);
    init(2 * x + 1, mid + 1, hi);
    update_point(x);
  }
  int merge_operation(int a, int b) { return (a ^ b); }
  long long merge_results(int a, int b) { return a + b; }
  void modify(int x, int lo, int hi, int l, int r, int op) {
    prop(x, lo, hi);
    if (lo >= l && hi <= r) {
      operation_arr[x] = merge_operation(operation_arr[x], op);
      return;
    }
    int mid = (lo + hi) / 2;
    if (lo > r || hi < l) return;
    modify(2 * x, lo, mid, l, r, op);
    modify(2 * x + 1, mid + 1, hi, l, r, op);
    update(x, lo, hi);
  }
  int get_sum(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return res[x];
    if (lo > r || hi < l) return 0;
    int mid = (lo + hi) / 2;
    return get_sum(2 * x, lo, mid, l, r) +
           get_sum(2 * x + 1, mid + 1, hi, l, r);
  }
  void point_modify(int x, int lo, int hi, int pos, long long val) {
    if (lo == hi) {
      res[x] = val;
      return;
    }
    int mid = (lo + hi) / 2;
    if (pos <= mid)
      point_modify(2 * x, lo, mid, pos, val);
    else
      point_modify(2 * x + 1, mid + 1, hi, pos, val);
    update_point(x);
  }
  long long max_query(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return res[x];
    if (lo > r || hi < l) return LLONG_MIN;
    int mid = (lo + hi) / 2;
    return max(max_query(2 * x, lo, mid, l, r),
               max_query(2 * x + 1, mid + 1, hi, l, r));
  }
  long long get_idx(int x, int lo, int hi, long long v) {
    if (res[x] < v) return hi + 1;
    if (lo == hi) return lo;
    int mid = (lo + hi) / 2;
    if (res[2 * x] >= v)
      return get_idx(2 * x, lo, mid, v);
    else
      return get_idx(2 * x + 1, mid + 1, hi, v);
  }
  pair<int, int> mx_q(int x, int lo, int hi, int l, int r) {
    if (lo >= l && hi <= r) return {res[x], idx_mx[x]};
    if (lo > r || hi < l) return {LLONG_MIN, -1};
    int mid = (lo + hi) / 2;
    pair<int, int> p1 = mx_q(2 * x, lo, mid, l, r);
    pair<int, int> p2 = mx_q(2 * x + 1, mid + 1, hi, l, r);
    if (p1.first > p2.first) {
      return p1;
    } else
      return p2;
  }
  int mx_idx = -1;
  void max_idx(int x, int lo, int hi, int val, int r) {
    if (res[x] < val) return;
    int mid = (lo + hi) / 2;
    if (lo > r) return;
    if (hi == lo && res[x] == val) {
      mx_idx = lo;
      return;
    }
    max_idx(2 * x, lo, mid, val, r);
    max_idx(2 * x + 1, mid + 1, hi, val, r);
  }
  int get_max_idx(int x, int lo, int hi, int val, int r) {
    max_idx(x, lo, hi, val, r);
    return mx_idx;
  }
  void update_point(int x) { res[x] = res[2 * x] + res[2 * x + 1]; }
  int query(int x, int lo, int hi, int l, int r) {
    prop(x, lo, hi);
    if (lo >= l && hi <= r) return operate(res[x], operation_arr[x], lo, hi);
    if (lo > r || hi < l) return 0;
    int mid = (lo + hi) / 2;
    return merge_results(query(2 * x, lo, mid, l, r),
                         query(2 * x + 1, mid + 1, hi, l, r));
  }
  int kth_one(int x, int lo, int hi, int k) {
    if (lo == hi) return lo;
    int v1 = res[2 * x];
    int mid = (lo + hi) / 2;
    if (k <= v1)
      return kth_one(2 * x, lo, mid, k);
    else
      return kth_one(2 * x + 1, mid + 1, hi, k - v1);
  }
  void prop(int x, int lo, int hi) {
    if (lo == hi) return;
    int mid = (hi + lo) / 2;
    long long len = mid - lo + 1;
    operation_arr[2 * x] =
        merge_operation(operation_arr[2 * x], operation_arr[x]);
    operation_arr[2 * x + 1] =
        merge_operation(operation_arr[2 * x + 1], operation_arr[x]);
    operation_arr[x] = NO_OPERATION;
    update(x, lo, hi);
  }
  int operate(int val, int operatr, int l, int r) {
    if (operatr == NO_OPERATION) return val;
    int sz = r - l + 1;
    return sz - val;
  }
  void update(int x, int lo, int hi) {
    if (lo == hi) return;
    int mid = (lo + hi) / 2;
    long long len1 = (mid - lo + 1);
    long long len2 = (hi - mid);
    res[x] = merge_results(
        operate(res[2 * x], operation_arr[2 * x], lo, mid),
        operate(res[2 * x + 1], operation_arr[2 * x + 1], mid + 1, hi));
  }
};
struct FenwickTree {
  int arr[100];
  int n;
  void update(int i, int delta) {
    while (i <= n) {
      arr[i] += delta;
      i = i + (i & (-i));
    }
  }
  int sum(int i) {
    if (i == 0) return 0;
    int res = 0;
    while (i > 0) {
      res = res + arr[i];
      i -= (i & (-i));
    }
    return res;
  }
};
struct dsu {
  int par[1001];
  int size_set[1001];
  void init(int n) {
    for (int i = 0; i <= n; i++) par[i] = i, size_set[i] = 1;
  }
  int get_par(int u) {
    vector<int> temp;
    while (par[u] != u) {
      temp.push_back(u);
      u = par[u];
    }
    for (int i : temp) par[i] = u;
    return u;
  }
  void union_set(int a, int b) {
    a = get_par(a);
    b = get_par(b);
    if (a == b) return;
    if (size_set[a] < size_set[b]) {
      int temp = a;
      a = b;
      b = temp;
    }
    par[b] = a;
    size_set[a] += size_set[b];
  }
  int get_size(int u) {
    u = get_par(u);
    return size_set[u];
  }
};
int check(string s1, string s2) {
  int n1 = s1.size();
  int n2 = s2.size();
  s1 = '$' + s1;
  s2 = '$' + s2;
  int dp[n1 + 1][n2 + 1];
  for (int j = 0; j <= n2; j++) dp[0][j] = 0;
  dp[0][0] = 1;
  for (int i = 1; i <= n1; i++) {
    dp[i][0] = 0;
  }
  int i1 = 1;
  while (i1 <= n1 && s1[i1] == '*') {
    dp[i1][0] = 1;
    i1++;
  }
  int sum[n2 + 1];
  int s = 0;
  for (int i = 0; i <= n2; i++) s = s + dp[0][i], sum[i] = s;
  for (int i = 1; i <= n1; i++) {
    for (int j = 1; j <= n2; j++) {
      char c1 = s1[i];
      char c2 = s2[j];
      if (c1 == '*') {
        if (sum[j] > 0)
          dp[i][j] = 1;
        else
          dp[i][j] = 0;
      } else if (c1 == '?') {
        dp[i][j] = dp[i - 1][j - 1];
      } else {
        if (c1 != c2)
          dp[i][j] = 0;
        else
          dp[i][j] = dp[i - 1][j - 1];
      }
    }
    s = 0;
    for (int j = 0; j <= n2; j++) {
      s += dp[i][j];
      sum[j] = s;
    }
  }
  return dp[n1][n2];
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lim = 1000000;
long long pw1[1000001];
long long pw2[1000001];
long long m1 = 1e9 + 7;
long long m2 = 1e9 + 9;
long long base = 256;
void pre_calc() {
  pw1[0] = 1;
  pw2[0] = 1;
  for (int i = 1; i <= lim; i++) {
    pw1[i] = (pw1[i - 1] * base) % m1;
    pw2[i] = (pw2[i - 1] * base) % m2;
  }
}
pair<long long, long long> string_hash(string s) {
  long long res1 = 0, res2 = 0;
  for (int i = 0; i < s.size(); i++) {
    long long v = (long long)s[i];
    res1 = (res1 + v * pw1[i]) % m1;
    res2 = (res2 + v * pw2[i]) % m2;
  }
  return make_pair(res1, res2);
}
bool isOverflow(long long a, long long b) {
  if (a == 0 || b == 0) return false;
  if (a <= LLONG_MAX / b)
    return false;
  else
    return true;
}
bool isOverflow_add(long long a, long long b) {
  long long res = a + b;
  if (res - a == b && res - b == a) return 0;
  return 1;
}
long long fact(long long i) {
  long long res = 1;
  for (int j = 1; j <= i; j++) res *= j;
  return res;
}
long long f1[5001];
long long f2[5001];
void fct() {
  f1[0] = 1;
  f2[0] = mpow(1, mod - 2);
  for (long long i = 1; i <= 5000; i++) {
    f1[i] = (f1[i - 1] * i) % mod;
    f2[i] = mpow(f1[i], mod - 2);
  }
}
long long ncr(int n, int r) {
  long long res = f1[n];
  res = (res * f2[r]) % mod;
  res = (res * f2[n - r]) % mod;
  return res;
}
int d[10000002];
long long N = (1e6 + 1);
vector<long long> pr;
void seive(int N) {
  for (int i = 2; i < N; i++) d[i] = i;
  for (long long i = 2; i < N; i++) {
    if (d[i] == i) pr.push_back(i);
    for (long long j = 0;
         j < (long long)pr.size() && pr[j] <= d[i] && i * pr[j] < N; j++)
      d[i * pr[j]] = pr[j];
  }
}
vector<pair<int, int> > fctorize(int n) {
  vector<pair<int, int> > res;
  while (n > 1) {
    int k = d[n];
    int cnt = 0;
    while (n > 1 && k == d[n]) n /= d[n], cnt++;
    res.push_back({k, cnt});
  }
  return res;
}
int odd_cnt(int cnt[]) {
  int c = 0;
  for (int i = 0; i < 26; i++) {
    if (cnt[i] % 2 == 1) c++;
  }
  return c;
}
void solve() {
  string s;
  cin >> s;
  int n = (int)s.size();
  int cnt[26];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < (int)s.size(); i++) {
    cnt[s[i] - 'a']++;
  }
  string res = "";
  if (n % 2 == 0) {
    int v = 0;
    while (odd_cnt(cnt) > 0) {
      bool b1 = 1;
      for (int i = 0; i < 26 && b1; i++) {
        for (int j = 25; j >= 0 && b1; j--) {
          if (cnt[i] % 2 == 1 && cnt[j] % 2 == 1) {
            cnt[i]++, cnt[j]--;
            b1 = 0;
            break;
          }
        }
      }
    }
    for (int i = 0; i < 26; i++) {
      for (int j = 1; j <= cnt[i] / 2; j++) res = res + (char)(i + 'a');
    }
    cout << res;
    for (int i = (int)res.size() - 1; i >= 0; i--) cout << res[i];
  } else {
    while (odd_cnt(cnt) > 1) {
      for (int i = 0; i < 26; i++) {
        for (int j = 25; j > i; j--) {
          if (cnt[i] % 2 == 1 && cnt[j] % 2 == 1) {
            cnt[i]++;
            cnt[j]--;
          }
        }
      }
    }
    int pos = -1;
    for (int i = 0; i < 26; i++) {
      if (cnt[i] % 2 == 1) {
        pos = i;
      }
    }
    for (int i = 0; i < 26; i++) {
      for (int j = 1; j <= cnt[i] / 2; j++) res += (char)(i + 'a');
    }
    int end = (int)res.size() - 1;
    res += (char)(pos + 'a');
    for (int i = end; i >= 0; i--) res += res[i];
    cout << res << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
long long mpow(long long base, long long exp) {
  base %= mod;
  long long result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b % 2 == 0) {
      b /= 2;
      if (isOverflow(a, a)) return LLONG_MAX;
      a = a * a;
    } else {
      if (isOverflow(res, a)) return LLONG_MAX;
      res = res * a;
      b--;
    }
  }
  return res;
}

```