#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cmath>
#include <map>
#include <fstream>
#include <string>
#include <queue>
#include <stack>

using namespace std;

/*
#define cin in
#define cout out
string taskname = "lucky";
ifstream in(taskname + ".in");
ofstream out(taskname + ".out");
/**/

#define lol long long
#define ll long long
#define mp make_pair
#define endl "\n"
#define EPS 0.00000001
#define pii pair<int,int>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define double long double

void print(map<char,int> & mapka, int n)
{
    vector<char> ans(n);
    int p = 0;

    for (char c = 'a'; c <= 'z'; ++c)
    {
        if (mapka[c] % 2 == 1)
        {
            mapka[c]--;
            ans[n/2] = c;
        }
        for (int j = 0; j < mapka[c]; j += 2)
        {
            ans[p] = ans[n - p - 1] = c;
            ++p;
        }
    }

    for (int i = 0; i < ans.size(); ++i)
        cout << ans[i];
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    string s;
    cin >> s;
    map<char, int> mapka;

    for (int i = 0; i < s.size(); ++i)
        mapka[s[i]]++;

    int cntOdd = 0;
    vector<char> x;
    for (char cc = 'a'; cc <= 'z'; ++cc)
        if (mapka[cc] % 2)
        {
            cntOdd++;
            x.push_back(cc);
        }

    if (s.size() % 2)
    {
        if (cntOdd != 1)
        {
            for (int i = 0; i < x.size()/2; ++i)
            {
                mapka[x[i]]++;
                mapka[x[x.size() - 1 - i]]--;
            }
        }
        print(mapka, s.size());
    }
    else
    {
        for (int i = 0; i < x.size()/2; ++i)
        {
            mapka[x[i]]++;
            mapka[x[x.size()/2 + i]]--;
        }
        print(mapka,s.size());
    }

    return 0;
}

/*
8
3 2 1 3 4 4 1 5
*/


#include <functional>
#include <iostream>
#include <ostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <ctime>
#include <set>

using namespace std;

int main()
{

#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
#endif

    string str;

    getline(cin, str);

    vector<int> print(26);

    for(int i = 0; i < str.size(); ++i)
    {
        print[str[i] - 'a']++;
    }

    vector<int> odd_positions;

    for(int i = 0; i < print.size(); ++i)
    {
        if (print[i] & 1)
            odd_positions.push_back(i);
    }

    if (odd_positions.size() > 0)
    {
        int i = 0, j = odd_positions.size()-1;
        //if (odd_positions.size() & 1)
        //    --j;

        for(; i < j; ++i, --j)
        {
            print[odd_positions[i]]++;
            print[odd_positions[j]]--;
        }
    }

    string result = "";

    for(int i = 0; i < print.size(); ++i)
    {
        result += string(print[i]/2, 'a' + i);
    }

    if (odd_positions.size() & 1)
    {
        result.push_back(odd_positions[odd_positions.size()/2] +'a');
    }

    for(int i = print.size() - 1; i >= 0; --i)
    {
        result += string(print[i]/2, 'a' + i);
    }

    cout << result;
}


#include <iostream>
#include <vector>
#include <cctype>
using namespace std;

void print(vector<int> list) {
        for (int i = 0; i < list.size(); ++i) {
                cout << list[i] << ' ';
        }
        cout << endl;
}

int main() {
        vector<int> list(27, 0);

        while(1)  {
                char input;
                cin.get(input);

                if (!isalpha(input)) {
                        break;
                }

                ++list[input - 'a'];
        }

        for (int ptr1 = 0, ptr2 = 26; ptr1 < ptr2; ++ptr1) {
                if (list[ptr1] % 2) {
                        while (ptr2 > ptr1 && !(list[ptr2] % 2)) {
                                --ptr2;
                        }

                        ++list[ptr1];
                        --list[ptr2];
                }

                //cout << "p1: " << ptr1 << ", p2: " << ptr2 << endl;
                //print(list);
        }

        for (int i = 0; i < list.size(); ++i) {
                for (int j = 0; j < list[i] / 2 || list[i] == 1; ++j) {
                        cout << (char)('a' + i);

                        if (list[i] == 1) break;
                }
        }

        for (int i = list.size() - 1; i >= 0; --i) {
                for (int j = 0; j < list[i] / 2; ++j) {
                        cout << (char)('a' + i);
                }
        }

        return 0;
}


#include <iostream>
#include <vector>
#include <cctype>
using namespace std;

int main() {
        vector<int> list(27, 0);

        while(1)  {
                char input;
                cin.get(input);

                if (!isalpha(input)) {
                        break;
                }

                ++list[input - 'a'];
        }

		int ptr1, ptr2;
        for (ptr1 = 0, ptr2 = 26; ptr1 < ptr2; ++ptr1) {
                if (list[ptr1] % 2) {
                        while (ptr2 > ptr1 && !(list[ptr2] % 2)) {
                                --ptr2;
                        }

                        ++list[ptr1];
                        --list[ptr2];
                }
        }

        for (int i = 0; i < list.size(); ++i) {
                for (int j = 0; j < list[i] / 2; ++j) {
						cout << (char)('a' + i);
                }
        }

		// Print middle char if one exists
		if (list[ptr1 - 1] % 2) {
				cout << (char)('a' + ptr1 - 1);
		}

        for (int i = list.size() - 1; i >= 0; --i) {
                for (int j = 0; j < list[i] / 2; ++j) {
                        cout << (char)('a' + i);
                }
        }

        return 0;
}


#include <iostream>
#include <vector>
#include <cctype>
using namespace std;

void print(vector<int> list) {
        for (int i = 0; i < list.size(); ++i) {
                cout << list[i] << ' ';
        }
        cout << endl;
}

int main() {
        vector<int> list(27, 0);

        while(1)  {
                char input;
                cin.get(input);

                if (!isalpha(input)) {
                        break;
                }

                ++list[input - 'a'];
        }

        for (int ptr1 = 0, ptr2 = 26; ptr1 < ptr2; ++ptr1) {
                if (list[ptr1] % 2) {
                        while (ptr2 > ptr1 && !(list[ptr2] % 2)) {
                                --ptr2;
                        }

                        ++list[ptr1];
                        --list[ptr2];
                }

                //cout << "p1: " << ptr1 << ", p2: " << ptr2 << endl;
                //print(list);
        }

        for (int i = 0; i < list.size(); ++i) {
                for (int j = 0; j < list[i] / 2; ++j) {
						cout << (char)('a' + i);
                }
        }

		bool firstFound = false;
        for (int i = list.size() - 1; i >= 0; --i) {
                for (int j = 0; j < list[i] / 2; ++j) {
                        cout << (char)('a' + i);
                }

				if (!firstFound && list[i] > 0)
				{
						firstFound = true;
						if (list[i] % 2)
						{
								cout << (char)('a' + i);
						}
				}
        }

        return 0;
}


#include <iostream>
#include <vector>
#include <cctype>
using namespace std;

int main() {
		ios_base::sync_with_stdio(0);
		cin.tie(0);
		cout.tie(0);

        vector<int> list(27, 0);

        while(1)  {
                char input;
                cin.get(input);

                if (!isalpha(input)) {
                        break;
                }

                ++list[input - 'a'];
        }

		int ptr1, ptr2;
        for (ptr1 = 0, ptr2 = 26; ptr1 < ptr2; ++ptr1) {
                if (list[ptr1] % 2) {
                        while (ptr2 > ptr1 && !(list[ptr2] % 2)) {
                                --ptr2;
                        }

                        ++list[ptr1];
                        --list[ptr2];
                }
        }

        for (int i = 0; i < list.size(); ++i) {
                for (int j = 0; j < list[i] / 2; ++j) {
						cout << (char)('a' + i);
                }
        }

		// Print middle char if one exists
		if (list[ptr1 - 1] % 2) {
				cout << (char)('a' + ptr1 - 1);
		}

        for (int i = list.size() - 1; i >= 0; --i) {
                for (int j = 0; j < list[i] / 2; ++j) {
                        cout << (char)('a' + i);
                }
        }

        return 0;
}


#if 01
/*******************************************************************************
* Author       : Quantum Of Excellence
* email        : quantumofexcellence (at) gmail (dot) com
* copyright    : 2014 - 2015
* date         : 27 - 11 - 2015
* Judge Status :
* Problem Category :
* file name    : C.cpp
* version      : 1.0
*
* TERMS OF USE - Write a mail to the author before copying or reusing the content of this file
* seeking our permission for the same.
* Copying/reuse of the below code without the permission of the author is prohibited and illegal.
*
* All rights reserved by Quantum Of Excellence.
******************************************************************************/

/*******************************************************************************
* some pointers on the logic/idea -
*
*
* .............
*/

#pragma once
#ifndef _QL_PRECOMPILATION_BARE_MINIMUM_HPP_
#define _QL_PRECOMPILATION_BARE_MINIMUM_HPP_

// Include file for std::cout, std::cin
#include<iostream>
#include <fstream>

// for itoa - does not work on some compilers(despite including cstdlib)
#include <cstdlib>
// for getch()
#include<stdio.h>

// For clock time and time duration stats
#include <time.h>

#include <map>
#include <vector>
#include <string>
#include <cstring>

#include <set>
#include <algorithm>
#include <utility>
#include <list>
#include <queue>
#include <stack>
#include <limits.h>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <assert.h>
#include <complex>
#include <valarray>
#include <iterator>

using namespace std;

namespace QoE_Library{

    namespace QL_Bare_Minimum{

        // constants
        // -----------------------------------------
        const double PI = 3.141592653589793238460;
        // const values
        const long double pi=10000*acos(-1.0L);
        const long double E= 2.7182818284590452353;
        const long double eps=1e-10;

        // 2 D array movement
        // -----------------------------------------
        const int DX4[]={0,1,0,-1};
        const int DY4[]={1,0,-1,0};
        const int DX8[]={-1,-1,-1,0,0,1,1,1};
        const int DY8[]={-1,0,1,-1,1,-1,0,1};
        const int neigh4[][2]={{-1,0},{1,0},{0,-1},{0,1}};
        const int neigh8[][2]={{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1}};

        template <typename T1> class Vector3D{
        public:
            T1 x,y,z;
            Vector3D(T1 x1,T1 y1,T1 z1):x(x1),y(y1),z(z1){
            }
            Vector3D(){}
        };

#define SETZERO(a) memset(a,0,sizeof(a))
#define SETVAL(a,val) memset(a,val,sizeof(a))
#define SETDP(a) memset(a,-1,sizeof(a))

        // check whether indices in range of an array/matrix or values
#define in_bounds(x, y, r, c) (x < r && y < c && x >= 0 && y >= 0)
#define in_range(x, lo, hi) (x <= hi && x >= lo )

        // get min of 3 values
#define min3(a,b,c) (a<min(b,c))?a:min(b,c)
#define max3(a,b,c) ((a>max(b,c))?a:max(b,c))

        // convert char into index
#define CHAR_TO_INDEX(c,startC) ((int)c - (int)startC)

        // Array size
#define SZ_ARR(A) sizeof(A)/sizeof(A[0])
        // STL MACROS -
#define SZ(C) C.size()

#define ALL(x) (x).begin(), (x).end()

        //pair
#define MKP(i,j) make_pair(i,j)
        // Map
#define M_Ins(_m_,i,j) _m_.insert(make_pair(i,j))

        // vector
#define PB(A,B) A.push_back(B);

        // STL sort()
#define SORT(A) sort( A.begin(),A.end() )

        // For loop
#define FOR(i, first, last, increment) for (int i = (first); i < (last); i = i + (increment))
#define QL_FOR FOR

#define DEBUGGING 1

        // Default For loop with variable name "i", first = 0, increment = 1
#define FOR_DEF(i, last) QL_FOR(i, 0, last, 1)
#define QL_FOR_DEF FOR_DEF

        // Dont care about the looping variable name
        // TODO : Need to solve the problem of generating a unique temp loop var, for now __i__ suffices
#define REPEAT(N) for (int __i__ = 0; __i__ < (N); ++__i__)

        // Reverse For loop
#define R_FOR(i, first, last, increment) for (int i = ((first) - 1); i >= (last); i = i - (increment))
#define QL_R_FOR R_FOR

        // Default For loop with variable name "i", first = 0, increment = 1
#define R_FOR_DEF(i, first) QL_R_FOR(i, first, 0, 1)
#define QL_R_FOR_DEF R_FOR_DEF
#if 0
#define FOR_STL(i,stl) for(typeof((c).begin()) i=(c).begin();i!=(c).end();++i)
#endif

#define EXISTS(c,e) ((c).find(e)!=(c).end())

        // For loop for map
#define QL_M_FOR(m,T1,T2,it) for(map<T1,T2>::iterator it=m.begin();it!=m.end();++it)
#define QL_M_R_FOR(m,T1,T2,rit) for(map<T1,T2>::reverse_iterator rit=m.rbegin();rit!=m.rend();++rit)

#if 0
#define QL_M_FOR(m,it) QL_M_FOR(m,int,int,it)   // for(map<int,int>::iterator it=m.begin();it!=m.end();++it)
#define QL_M_R_FOR(m,rit) QL_M_R_FOR(m,int,int,it)   //for(map<int,int>::reverse_iterator rit=m.rbegin();rit!=m.rend();++rit)
#endif

        typedef unsigned long long int ulli_t;
        typedef ulli_t ULLI;
        typedef vector<ulli_t> uivector_t;
        typedef uivector_t::iterator uivector_it_t;
        typedef uivector_t::const_iterator uivector_cit_t;

        typedef long long int lli_t;
        typedef lli_t LLI;
        typedef vector<lli_t> ivector_t;

        typedef ivector_t::iterator ivector_it_t;
        typedef ivector_t::const_iterator ivector_cit_t;

        // pair
        typedef pair<int,int> p_ii_t;
        typedef p_ii_t P_II;
        typedef pair<LLI,LLI> p_llilli_t;
        typedef p_llilli_t P_LLILLI;

        // vector
        typedef vector<int> v_i_t;
        typedef v_i_t V_I;
        typedef vector<LLI> v_lli_t;
        typedef v_lli_t V_LLI;
        typedef vector<ULLI> v_ulli_t;
        typedef v_ulli_t V_ULLI;

        typedef vector<p_ii_t> v_p_ii_t;
        typedef v_p_ii_t V_P_II;

        typedef vector<v_i_t> vv_i_t;
        typedef vv_i_t VV_I;
        typedef vector<v_p_ii_t> vv_p_ii_t;
        typedef vv_p_ii_t VV_P_II;

        typedef vector<string> v_s_t;
        typedef v_s_t V_S;

        //map
        typedef map<int,int> M_II;
        typedef M_II::iterator M_II_IT;
        typedef M_II::reverse_iterator M_II_RIT;

        // multimap
        typedef multimap<int,int> MM_II;
        typedef MM_II::reverse_iterator MM_II_RIT;

        //queue
        typedef queue<int> q_i_t;
        typedef q_i_t Q_I;

        typedef long double ld_t;
        typedef ld_t LD;

        /*  ------- BEWARE -    macros can't be overloaded i.e. both the 'read's below
        can't have the same name    ---------- */
#define read1(n) cin >> n;
#define read2(m, n) cin >> m >> n;
#define read3(m, n, o) cin >> m >> n >> o;
        // #define readArr(n, size) QL_FOR_DEF(i, size) { cin >> n[i]; }
#define readArr1D(n, size)  QL_FOR_DEF(i, size) \
        {                   \
        cin >> n[i];    \
        }

#define write1(n) cout << n;
#define write2(m, n) cout << m << n;
#define write3(m, n, o) cout << m << n << o;
#define writeArr1D(n, size) QL_FOR_DEF(i, size) \
        {                   \
        cout << n[i];   \
        }

#define DBG(x)              cout<<__LINE__<<" :: "<<#x<< ": "<<x<<endl;
#define DBG2(x, y)          cout<<__LINE__<<" :: "<<#x<< ": "<<x<<" | "<<#y<< ": "<<y<<endl;
#define DBG3(x, y, z)       cout<<__LINE__<<" :: "<<#x<< ": "<<x<<" | "<<#y<< ": "<<y<<" | "<<#z<<": "<<z<<endl;
#define DBG4(a, b, c, d)    cout<<__LINE__<<" :: "<<#a<< ": "<<a<<" | "<<#b<< ": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;

        /* stoi,itos and atoi & itoa functions parse only a single int to string and
        vice-a-versa. The below function can do it for any number of data in the string.
        As shown below.

        A more convenient tool to use is - sscanf().
        sscanf(s.c_str(),"%d%c%d",&a,&c,&b);
        */
        template<typename T1> inline T1 to_type(string s){
            T1 a;
            istringstream sin(s);
            sin>>a;
            // for 3 data values to be parsed from the string do -
            //sin>>a>>b>>c;
            return a;
        }
        template<typename T1> inline string to_str(T1 a){
            ostringstream sout;
            string s;
            sout>>a;
            // for 3 data values to be converted to string do -
            //sout>>a>>b>>c;
            return sout.str();
        }

        inline void inpS(char *a){
            scanf("%s", a);
        }

        // Fast reading Integer from stdin.
        inline int inpI(/*int &n*/) {
            int n = 0;
            int ch = getchar();
            // int ch = getchar_unlocked();
            int sign = 1;
            while(ch < '0' || ch > '9') {
                if (ch == '-') sign = -1;
                ch = getchar();
                // ch = getchar_unlocked();
            }
            while(ch >= '0' && ch <= '9')
                n = (n<<3) + (n<<1) + ch - '0', ch = getchar();
            // n = (n<<3) + (n<<1) + ch - '0', ch = getchar_unlocked();
            n = n*sign;

            return n;
        }
        inline void inpI2(int &a,int &b){
            a=inpI();
            b=inpI();
        }
        inline void inpI3(int &a,int &b,int &c){
            a=inpI();
            b=inpI();
            c=inpI();
        }

        inline double inpD() {
            double res = 0.0;
            char c;
            while(1) {
                c = getchar();
                // c = getchar_unlocked();
                if(c == ' ' || c == '\n') continue;
                else break;
            }
            res = c - '0';
            while(1) {
                c = getchar();
                // c = getchar_unlocked();
                if(c >= '0' && c <= '9') res = 10 * res + c - '0';
                else break;
            }
            if(c == '.') {
                double decimal = 0.0, divi = 1.0;
                while(1) {
                    c = getchar();
                    // c = getchar_unlocked();
                    if(c >= '0' && c <= '9') decimal += (c - '0') / (divi *= 10.0);
                    else break;
                }
                res += decimal;
            }
            return res;
        }

        inline void outpD(double N) {
            char buff[24],sz=0;
            int integer = N;
            int decimal = (N - integer) * 10000000;
            int tmp = decimal;

            while(decimal) {
                buff[sz++] = '0' + decimal % 10;
                decimal /= 10;
            }
            for(int decimal2 = 1000000; decimal2 > tmp; decimal2 /= 10) {
                buff[sz++] = '0';
            }
            buff[sz++] = '.';
            if(integer == 0) buff[sz++] = '0';
            while(integer) {
                buff[sz++] = '0' + integer % 10;
                integer /= 10;
            }
            while(--sz>=0)
                putchar(buff[sz]);
            // putchar_unlocked(buff[sz]);
            putchar(10);
            // putchar_unlocked(10);
        }
        inline void outpI(int a) {
            char c;
            char snum[20];
            int i=0;
            int sign = 0;
            if(a < 0) sign = 1;
            a = abs(a);
            do {
                snum[i++]=a%10+48;
                a=a/10;
            } while(a!=0);
            i=i-1;
            if(sign)
                putchar('-');
            // putchar_unlocked('-');

            while(i>=0)
                putchar(snum[i--]);
            // putchar_unlocked(snum[i--]);
            putchar('\n');
            // putchar_unlocked('\n');
        }
        inline void outpI2(int a,int b){
            printf("%d ",a);
            outpI(b);
        }
        inline int outpS(char *s){
            return printf("%s\n",s);
        }
        /*  // Giving 'function defined twice' error while running Graph.cpp Code
        void reorderLLI(LLI &x, LLI& y){
        LLI xCopy, yCopy;
        if (x < y){
        y = xCopy;
        x = yCopy;
        }
        }

        void reorderI(int &x, int& y){
        int xCopy, yCopy;
        if (x < y){
        y = xCopy;
        x = yCopy;
        }
        }
        */
        template<typename T1> void QL_swap(T1 &x, T1 &y){
            /*  Below code is risky
            x = x+y;
            y = x-y;
            x = x-y;
            */
            T1 tmp;
            tmp=x;
            x=y;
            y=tmp;
        }

        // commented while using Graph class.
#if 0
        void QL_swapChars(char *a,char *b){
            char tmp=*a;
            *a=*b;
            *b=tmp;
        }
#endif

        /*  Note - Lesson Learnt - return type should also be promoted while overloading the operator,
        otherwise buggy code.
        Also, if a & b have return type ULLI and LLI, we'll get ambiguity error. Both types
        should be unsigned in order to make it unambiguous.
        As if int is promoted to ULLI, both would be promoted or both would not be.
        */
        /*  NOTE - gcd{a,b} = gcd{|a|, b} = gcd{a,|b|} = gcd{|a|, |b|}
        And gcd(a,0) = a.
        */
        template<typename T1> T1 gcd(T1 a, T1 b) {
            if (!b)return a;
            return gcd(b, a%b);
        }
        LLI euclideanDistSq(LLI x1,LLI y1,LLI x2,LLI y2){

            return (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
        }
        // Scalar product
        template<typename T1> T1 dotProd(T1 x1,T1 y1,T1 z1,T1 x2,T1 y2,T1 z2){
            return x1*x2+y1*y2+z1*z2;
        }
        // Vector product
        template<typename T1> Vector3D<T1> crossProd(Vector3D<T1> v1, Vector3D<T1> v2){
            Vector3D<T1> v;
            v.x=v1.y*v2.z - v2.y*v1.z;
            v.y=v1.z*v2.x - v2.z*v1.x;
            v.z=v1.x*v2.y - v2.x*v1.y;
            return v;
        }
    }
}
#endif  // _QL_PRECOMPILATION_BARE_MINIMUM_HPP_

#if 01
using namespace QoE_Library::QL_Bare_Minimum;

#define PRINT_TIME 0
#define GEN_TEST_CASES 0
#define MAT_SIZE 1005

/*  Test cases -
input-

output-
*/
int a[26];

int main(){
#if PRINT_TIME
    clock_t t = clock();
#endif

#if 0
    FILE *fIn = freopen("G:\\DUMP\\input.in", "r", stdin);
    //FILE *fOut = freopen("G:\\DUMP\\output.out", "w", stdout);
    //FILE *fLog = freopen("G:\\DUMP\\log.log", "w", stderr);
    //assert(fIn&&fOut&&fLog);
#endif
    int t=1,n;
    while(t--){
        string s;
        cin>>s;
        int l=SZ(s),c=0;
        QL_FOR_DEF(x,l)++a[s[x]-'a'];

        int i=0,j=26;
        while(i<j){
            if(!(a[i]%2)){
                ++i;
                continue;
            }
            if(!(a[j]%2)){
                --j;
                continue;
            }
            ++a[i];
            --a[j];
        }
        string o1,o2;
        QL_FOR_DEF(p,26){
            if(a[p]%2)continue;
            QL_FOR_DEF(q,a[p]/2){
                o1+='a'+p;
            }
            QL_FOR_DEF(q,a[p]/2){
                string tmp="a";
                tmp[0]+=p;
                o2=tmp+o2;
            }
        }
        QL_FOR_DEF(p,26){
            if(a[p]%2){
                QL_FOR_DEF(q,a[p])
                    o1+='a'+p;
            }
        }
        cout<<o1<<o2<<endl;
    }
#if PRINT_TIME
    t = clock() - t;
    // printf("time = %Ld", (double)t/CLOCKS_PER_SEC);
    cout << "time = " << (double)t/CLOCKS_PER_SEC;
#endif
}
#endif
#endif


#if 01
/*******************************************************************************
* Author       : Quantum Of Excellence
* email        : quantumofexcellence (at) gmail (dot) com
* copyright    : 2014 - 2015
* date         : 27 - 11 - 2015
* Judge Status :
* Problem Category :
* file name    : C.cpp
* version      : 1.0
*
* TERMS OF USE - Write a mail to the author before copying or reusing the content of this file
* seeking our permission for the same.
* Copying/reuse of the below code without the permission of the author is prohibited and illegal.
*
* All rights reserved by Quantum Of Excellence.
******************************************************************************/

/*******************************************************************************
* some pointers on the logic/idea -
*
*
* .............
*/

#pragma once
#ifndef _QL_PRECOMPILATION_BARE_MINIMUM_HPP_
#define _QL_PRECOMPILATION_BARE_MINIMUM_HPP_

// Include file for std::cout, std::cin
#include<iostream>
#include <fstream>

// for itoa - does not work on some compilers(despite including cstdlib)
#include <cstdlib>
// for getch()
#include<stdio.h>

// For clock time and time duration stats
#include <time.h>

#include <map>
#include <vector>
#include <string>
#include <cstring>

#include <set>
#include <algorithm>
#include <utility>
#include <list>
#include <queue>
#include <stack>
#include <limits.h>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <assert.h>
#include <complex>
#include <valarray>
#include <iterator>

using namespace std;

namespace QoE_Library{

    namespace QL_Bare_Minimum{

        // constants
        // -----------------------------------------
        const double PI = 3.141592653589793238460;
        // const values
        const long double pi=10000*acos(-1.0L);
        const long double E= 2.7182818284590452353;
        const long double eps=1e-10;

        // 2 D array movement
        // -----------------------------------------
        const int DX4[]={0,1,0,-1};
        const int DY4[]={1,0,-1,0};
        const int DX8[]={-1,-1,-1,0,0,1,1,1};
        const int DY8[]={-1,0,1,-1,1,-1,0,1};
        const int neigh4[][2]={{-1,0},{1,0},{0,-1},{0,1}};
        const int neigh8[][2]={{-1,0},{-1,-1},{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1}};

        template <typename T1> class Vector3D{
        public:
            T1 x,y,z;
            Vector3D(T1 x1,T1 y1,T1 z1):x(x1),y(y1),z(z1){
            }
            Vector3D(){}
        };

#define SETZERO(a) memset(a,0,sizeof(a))
#define SETVAL(a,val) memset(a,val,sizeof(a))
#define SETDP(a) memset(a,-1,sizeof(a))

        // check whether indices in range of an array/matrix or values
#define in_bounds(x, y, r, c) (x < r && y < c && x >= 0 && y >= 0)
#define in_range(x, lo, hi) (x <= hi && x >= lo )

        // get min of 3 values
#define min3(a,b,c) (a<min(b,c))?a:min(b,c)
#define max3(a,b,c) ((a>max(b,c))?a:max(b,c))

        // convert char into index
#define CHAR_TO_INDEX(c,startC) ((int)c - (int)startC)

        // Array size
#define SZ_ARR(A) sizeof(A)/sizeof(A[0])
        // STL MACROS -
#define SZ(C) C.size()

#define ALL(x) (x).begin(), (x).end()

        //pair
#define MKP(i,j) make_pair(i,j)
        // Map
#define M_Ins(_m_,i,j) _m_.insert(make_pair(i,j))

        // vector
#define PB(A,B) A.push_back(B);

        // STL sort()
#define SORT(A) sort( A.begin(),A.end() )

        // For loop
#define FOR(i, first, last, increment) for (int i = (first); i < (last); i = i + (increment))
#define QL_FOR FOR

#define DEBUGGING 1

        // Default For loop with variable name "i", first = 0, increment = 1
#define FOR_DEF(i, last) QL_FOR(i, 0, last, 1)
#define QL_FOR_DEF FOR_DEF

        // Dont care about the looping variable name
        // TODO : Need to solve the problem of generating a unique temp loop var, for now __i__ suffices
#define REPEAT(N) for (int __i__ = 0; __i__ < (N); ++__i__)

        // Reverse For loop
#define R_FOR(i, first, last, increment) for (int i = ((first) - 1); i >= (last); i = i - (increment))
#define QL_R_FOR R_FOR

        // Default For loop with variable name "i", first = 0, increment = 1
#define R_FOR_DEF(i, first) QL_R_FOR(i, first, 0, 1)
#define QL_R_FOR_DEF R_FOR_DEF
#if 0
#define FOR_STL(i,stl) for(typeof((c).begin()) i=(c).begin();i!=(c).end();++i)
#endif

#define EXISTS(c,e) ((c).find(e)!=(c).end())

        // For loop for map
#define QL_M_FOR(m,T1,T2,it) for(map<T1,T2>::iterator it=m.begin();it!=m.end();++it)
#define QL_M_R_FOR(m,T1,T2,rit) for(map<T1,T2>::reverse_iterator rit=m.rbegin();rit!=m.rend();++rit)

#if 0
#define QL_M_FOR(m,it) QL_M_FOR(m,int,int,it)   // for(map<int,int>::iterator it=m.begin();it!=m.end();++it)
#define QL_M_R_FOR(m,rit) QL_M_R_FOR(m,int,int,it)   //for(map<int,int>::reverse_iterator rit=m.rbegin();rit!=m.rend();++rit)
#endif

        typedef unsigned long long int ulli_t;
        typedef ulli_t ULLI;
        typedef vector<ulli_t> uivector_t;
        typedef uivector_t::iterator uivector_it_t;
        typedef uivector_t::const_iterator uivector_cit_t;

        typedef long long int lli_t;
        typedef lli_t LLI;
        typedef vector<lli_t> ivector_t;

        typedef ivector_t::iterator ivector_it_t;
        typedef ivector_t::const_iterator ivector_cit_t;

        // pair
        typedef pair<int,int> p_ii_t;
        typedef p_ii_t P_II;
        typedef pair<LLI,LLI> p_llilli_t;
        typedef p_llilli_t P_LLILLI;

        // vector
        typedef vector<int> v_i_t;
        typedef v_i_t V_I;
        typedef vector<LLI> v_lli_t;
        typedef v_lli_t V_LLI;
        typedef vector<ULLI> v_ulli_t;
        typedef v_ulli_t V_ULLI;

        typedef vector<p_ii_t> v_p_ii_t;
        typedef v_p_ii_t V_P_II;

        typedef vector<v_i_t> vv_i_t;
        typedef vv_i_t VV_I;
        typedef vector<v_p_ii_t> vv_p_ii_t;
        typedef vv_p_ii_t VV_P_II;

        typedef vector<string> v_s_t;
        typedef v_s_t V_S;

        //map
        typedef map<int,int> M_II;
        typedef M_II::iterator M_II_IT;
        typedef M_II::reverse_iterator M_II_RIT;

        // multimap
        typedef multimap<int,int> MM_II;
        typedef MM_II::reverse_iterator MM_II_RIT;

        //queue
        typedef queue<int> q_i_t;
        typedef q_i_t Q_I;

        typedef long double ld_t;
        typedef ld_t LD;

        /*  ------- BEWARE -    macros can't be overloaded i.e. both the 'read's below
        can't have the same name    ---------- */
#define read1(n) cin >> n;
#define read2(m, n) cin >> m >> n;
#define read3(m, n, o) cin >> m >> n >> o;
        // #define readArr(n, size) QL_FOR_DEF(i, size) { cin >> n[i]; }
#define readArr1D(n, size)  QL_FOR_DEF(i, size) \
        {                   \
        cin >> n[i];    \
        }

#define write1(n) cout << n;
#define write2(m, n) cout << m << n;
#define write3(m, n, o) cout << m << n << o;
#define writeArr1D(n, size) QL_FOR_DEF(i, size) \
        {                   \
        cout << n[i];   \
        }

#define DBG(x)              cout<<__LINE__<<" :: "<<#x<< ": "<<x<<endl;
#define DBG2(x, y)          cout<<__LINE__<<" :: "<<#x<< ": "<<x<<" | "<<#y<< ": "<<y<<endl;
#define DBG3(x, y, z)       cout<<__LINE__<<" :: "<<#x<< ": "<<x<<" | "<<#y<< ": "<<y<<" | "<<#z<<": "<<z<<endl;
#define DBG4(a, b, c, d)    cout<<__LINE__<<" :: "<<#a<< ": "<<a<<" | "<<#b<< ": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;

        /* stoi,itos and atoi & itoa functions parse only a single int to string and
        vice-a-versa. The below function can do it for any number of data in the string.
        As shown below.

        A more convenient tool to use is - sscanf().
        sscanf(s.c_str(),"%d%c%d",&a,&c,&b);
        */
        template<typename T1> inline T1 to_type(string s){
            T1 a;
            istringstream sin(s);
            sin>>a;
            // for 3 data values to be parsed from the string do -
            //sin>>a>>b>>c;
            return a;
        }
        template<typename T1> inline string to_str(T1 a){
            ostringstream sout;
            string s;
            sout>>a;
            // for 3 data values to be converted to string do -
            //sout>>a>>b>>c;
            return sout.str();
        }

        inline void inpS(char *a){
            scanf("%s", a);
        }

        // Fast reading Integer from stdin.
        inline int inpI(/*int &n*/) {
            int n = 0;
            int ch = getchar();
            // int ch = getchar_unlocked();
            int sign = 1;
            while(ch < '0' || ch > '9') {
                if (ch == '-') sign = -1;
                ch = getchar();
                // ch = getchar_unlocked();
            }
            while(ch >= '0' && ch <= '9')
                n = (n<<3) + (n<<1) + ch - '0', ch = getchar();
            // n = (n<<3) + (n<<1) + ch - '0', ch = getchar_unlocked();
            n = n*sign;

            return n;
        }
        inline void inpI2(int &a,int &b){
            a=inpI();
            b=inpI();
        }
        inline void inpI3(int &a,int &b,int &c){
            a=inpI();
            b=inpI();
            c=inpI();
        }

        inline double inpD() {
            double res = 0.0;
            char c;
            while(1) {
                c = getchar();
                // c = getchar_unlocked();
                if(c == ' ' || c == '\n') continue;
                else break;
            }
            res = c - '0';
            while(1) {
                c = getchar();
                // c = getchar_unlocked();
                if(c >= '0' && c <= '9') res = 10 * res + c - '0';
                else break;
            }
            if(c == '.') {
                double decimal = 0.0, divi = 1.0;
                while(1) {
                    c = getchar();
                    // c = getchar_unlocked();
                    if(c >= '0' && c <= '9') decimal += (c - '0') / (divi *= 10.0);
                    else break;
                }
                res += decimal;
            }
            return res;
        }

        inline void outpD(double N) {
            char buff[24],sz=0;
            int integer = N;
            int decimal = (N - integer) * 10000000;
            int tmp = decimal;

            while(decimal) {
                buff[sz++] = '0' + decimal % 10;
                decimal /= 10;
            }
            for(int decimal2 = 1000000; decimal2 > tmp; decimal2 /= 10) {
                buff[sz++] = '0';
            }
            buff[sz++] = '.';
            if(integer == 0) buff[sz++] = '0';
            while(integer) {
                buff[sz++] = '0' + integer % 10;
                integer /= 10;
            }
            while(--sz>=0)
                putchar(buff[sz]);
            // putchar_unlocked(buff[sz]);
            putchar(10);
            // putchar_unlocked(10);
        }
        inline void outpI(int a) {
            char c;
            char snum[20];
            int i=0;
            int sign = 0;
            if(a < 0) sign = 1;
            a = abs(a);
            do {
                snum[i++]=a%10+48;
                a=a/10;
            } while(a!=0);
            i=i-1;
            if(sign)
                putchar('-');
            // putchar_unlocked('-');

            while(i>=0)
                putchar(snum[i--]);
            // putchar_unlocked(snum[i--]);
            putchar('\n');
            // putchar_unlocked('\n');
        }
        inline void outpI2(int a,int b){
            printf("%d ",a);
            outpI(b);
        }
        inline int outpS(char *s){
            return printf("%s\n",s);
        }
        /*  // Giving 'function defined twice' error while running Graph.cpp Code
        void reorderLLI(LLI &x, LLI& y){
        LLI xCopy, yCopy;
        if (x < y){
        y = xCopy;
        x = yCopy;
        }
        }

        void reorderI(int &x, int& y){
        int xCopy, yCopy;
        if (x < y){
        y = xCopy;
        x = yCopy;
        }
        }
        */
        template<typename T1> void QL_swap(T1 &x, T1 &y){
            /*  Below code is risky
            x = x+y;
            y = x-y;
            x = x-y;
            */
            T1 tmp;
            tmp=x;
            x=y;
            y=tmp;
        }

        // commented while using Graph class.
#if 0
        void QL_swapChars(char *a,char *b){
            char tmp=*a;
            *a=*b;
            *b=tmp;
        }
#endif

        /*  Note - Lesson Learnt - return type should also be promoted while overloading the operator,
        otherwise buggy code.
        Also, if a & b have return type ULLI and LLI, we'll get ambiguity error. Both types
        should be unsigned in order to make it unambiguous.
        As if int is promoted to ULLI, both would be promoted or both would not be.
        */
        /*  NOTE - gcd{a,b} = gcd{|a|, b} = gcd{a,|b|} = gcd{|a|, |b|}
        And gcd(a,0) = a.
        */
        template<typename T1> T1 gcd(T1 a, T1 b) {
            if (!b)return a;
            return gcd(b, a%b);
        }
        LLI euclideanDistSq(LLI x1,LLI y1,LLI x2,LLI y2){

            return (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
        }
        // Scalar product
        template<typename T1> T1 dotProd(T1 x1,T1 y1,T1 z1,T1 x2,T1 y2,T1 z2){
            return x1*x2+y1*y2+z1*z2;
        }
        // Vector product
        template<typename T1> Vector3D<T1> crossProd(Vector3D<T1> v1, Vector3D<T1> v2){
            Vector3D<T1> v;
            v.x=v1.y*v2.z - v2.y*v1.z;
            v.y=v1.z*v2.x - v2.z*v1.x;
            v.z=v1.x*v2.y - v2.x*v1.y;
            return v;
        }
    }
}
#endif  // _QL_PRECOMPILATION_BARE_MINIMUM_HPP_

#if 01
using namespace QoE_Library::QL_Bare_Minimum;

#define PRINT_TIME 0
#define GEN_TEST_CASES 0
#define MAT_SIZE 1005

/*  Test cases -
input-

output-
*/
int a[26];

int main(){
#if PRINT_TIME
    clock_t t = clock();
#endif

#if 0
    FILE *fIn = freopen("G:\\DUMP\\input.in", "r", stdin);
    //FILE *fOut = freopen("G:\\DUMP\\output.out", "w", stdout);
    //FILE *fLog = freopen("G:\\DUMP\\log.log", "w", stderr);
    //assert(fIn&&fOut&&fLog);
#endif
    int t=1,n;
    while(t--){
        string s;
        cin>>s;
        int l=SZ(s),c=0;
        QL_FOR_DEF(x,l)++a[s[x]-'a'];

        int i=0,j=26;
        while(i<j){
            if(!(a[i]%2)){
                ++i;
                continue;
            }
            if(!(a[j]%2)){
                --j;
                continue;
            }
            ++a[i];
            --a[j];
        }
        string o1,o2;
        QL_FOR_DEF(p,26){

            // if(a[p]%2)continue;

            QL_FOR_DEF(q,a[p]/2){
                o1+='a'+p;
            }
            QL_FOR_DEF(q,a[p]/2){
                string tmp="a";
                tmp[0]+=p;
                o2=tmp+o2;
            }
        }
        QL_FOR_DEF(p,26){
            if(a[p]%2){
                //QL_FOR_DEF(q,a[p])
                o1+='a'+p;
            }
        }
        cout<<o1<<o2<<endl;
    }
#if PRINT_TIME
    t = clock() - t;
    // printf("time = %Ld", (double)t/CLOCKS_PER_SEC);
    cout << "time = " << (double)t/CLOCKS_PER_SEC;
#endif
}
#endif
#endif


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	bool hui = false;
	while(change != 0)
	{
		while(freq[i] % 2 != 1)
		{
			++i;
			if(i > 25)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		while(freq[j] % 2 != 1)
		{
			--j;
			if(j < 0)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	hui = false;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			if (j > 25)
			{
				hui = true;
				break;
			}
			++j;
		}
		if (hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	bool hui = false;
	while(change > 0)
	{
		while(freq[i] % 2 != 1)
		{
			++i;
			if(i > 25)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		while(freq[j] % 2 != 1)
		{
			--j;
			if(j < 0)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	hui = false;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			if (j > 25)
			{
				hui = true;
				break;
			}
			++j;
		}
		if (hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change = 0;
	scanf("%s", s);

	int odd[26];
	int nodd = 0;
	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2)
		{
			odd[nodd] = i;
			++nodd;
		}

	change = nodd / 2;
	int i = 0;
	while(change > 0)
	{
		freq[odd[i]]++;
		freq[odd[nodd - i - 1]]--;
		++i;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	int j = 0;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			++j;
		}
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	while(change != 0)
	{
		while(freq[i] % 2 != 1)
			++i;
		while(freq[j] % 2 != 1)
			--j;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
			++j;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change = 0;
	scanf("%s", s);

	int odd[26];
	int nodd = 0;
	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2)
		{
			odd[nodd] = i;
			++nodd;
		}

	change = nodd / 2;
	int i = 0;
	while(change > 0)
	{
		freq[odd[i]]++;
		freq[odd[nodd - i - 1]]--;
		++i;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	int j = 0;
	bool hui = true;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			++j;
			if(j > 25)
			{
				hui = false;
				break;
			}
		}
		if(!hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

char freq[26];
char s[200005];
int main()
{
	int count = 0, change;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	while(change != 0)
	{
		while(freq[i] % 2 != 1)
			++i;
		while(freq[j] % 2 != 1)
			--j;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
			++j;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change = 0;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	bool hui = false;
	while(change > 0)
	{
		while(freq[i] % 2 != 1)
		{
			++i;
			if(i > 25)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		while(freq[j] % 2 != 1)
		{
			--j;
			if(j < 0)
			{
				hui = true;
				break;
			}
		}
		if(hui)
			break;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	hui = false;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			if (j > 25)
			{
				hui = true;
				break;
			}
			++j;
		}
		if (hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change = 0;
	scanf("%s", s);

	int L = strlen(s);
	int odd[26];
	int nodd = 0;
	for (int i = 0; i < L; ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2)
		{
			odd[nodd] = i;
			++nodd;
		}

	change = nodd / 2;
	int i = 0;
	while(change > 0)
	{
		freq[odd[i]]++;
		freq[odd[nodd - i - 1]]--;
		++i;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	int j = 0;
	bool hui = true;
	for (int i = 0; i < L / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			++j;
			if(j > 25)
			{
				hui = false;
				break;
			}
		}
		if(!hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[L - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (L % 2 == 1)
	{
		s[L / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <cstdio>
#include <cstring>

int freq[26];
char s[200005];
int main()
{
	int count = 0, change;
	scanf("%s", s);

	for (int i = 0; i < strlen(s); ++i)
		freq[(int)s[i] - (int)'a']++;
	for (int i = 0; i < 26; ++i)
		count += freq[i] % 2;
	change = count / 2;

	int i = 0, j = 25;
	while(change != 0)
	{
		while(freq[i] % 2 != 1)
			++i;
		while(freq[j] % 2 != 1)
			--j;
		freq[j]--;
		freq[i]++;
		--change;
	}
	int pedik;
	for (int i = 0; i < 26; ++i)
		if (freq[i] % 2 == 1)
			pedik = i;

	j = 0;
	bool hui = false;
	for (int i = 0; i < strlen(s) / 2; ++i)
	{
		while(freq[j] == 0 || freq[j] == 1)
		{
			if (j > 25)
			{
				hui = true;
				break;
			}
			++j;
		}
		if (hui)
			break;
		s[i] = (char)((int)'a' + j);
		s[strlen(s) - 1 - i] = (char)((int)'a' + j);
		freq[j] -= 2;
	}
	if (strlen(s) % 2 == 1)
	{
		s[strlen(s) / 2] = (char)((int)'a' + pedik);
	}
	printf("%s\n", s);
	return 0;
}


#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <iterator>
#include <assert.h>
#include <time.h>
#pragma warning(disable:4996)

typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF 9223300000000000000
#define INF 2140000000
const long long MOD = 1000000007;
//const long long MOD = 998244353;

using namespace std;

char str[200005];

int main(int argc, char* argv[])
{
    scanf("%s", str);
    int n=strlen(str);
    int cnt[26]={0};
    int i;
    for(i=0; i<n; i++) {
        cnt[str[i]-'a']++;
    }

    int c=0;
    for(i=0; i<26; i++) {
        if(cnt[i]%2) c++;
    }
    int c2=c/2;
    int c3=c%2;
    int cnt0=0;
    for(i=0; i<26; i++) {
        if(cnt[i]%2) {
            if(cnt0<c2) cnt[i]++;
            else if(cnt0>=c2+c3) cnt[i]--;
            cnt0++;
        }
    }

    c=-1;
    for(i=0; i<26; i++) {
        if(cnt[i]%2) {
            c=i;
            cnt[i]--;
        }
    }

    vector<char> zz;
    int j;
    for(i=0; i<26; i++) {
        for(j=0; j<cnt[i]/2; j++) {
            zz.push_back('a'+i);
        }
    }
    if(c>=0) zz.push_back('a'+c);
    for(i=25; i>=0; i--) {
        for(j=0; j<cnt[i]/2; j++) {
            zz.push_back('a'+i);
        }
    }
    zz.push_back('\0');
    printf("%s\n", &zz[0]);

    return 0;
}


#include<iostream>
#include<string>
#include<cstring>
#include<set>
#include<cstdio>
#include<map>
#include<unordered_map>
#include<ctime>
#include<deque>
#include<cmath>
#include<queue>
#include<vector>
#include<bitset>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int, int> P;
char s[200222];
int cnt[333];
int main(){
    scanf("%s", &s);
    int kol=0;
    int n=strlen(s);
    for(int i=0; i<n; i++)
        cnt[s[i]]++;
    for(int i='a'; i<='z'; i++)
        kol+=cnt[i]%2;
    while(kol>1){
        for(int i='z'; i>='a'; i--){
            if(cnt[i]%2){
                cnt[i]--;
                for(int j='a'; j<='z'; j++){
                    if(cnt[j]%2){
                        cnt[j]++;
                        break;
                    }
                }
                break;
            }
        }
        kol-=2;
    }
    string res;
    for(int i='a'; i<='z'; i++)
        for(int j=0; j<cnt[i]/2+cnt[i]%2; j++)
            res+=i;
    for(int i='z'; i>='a'; i--)
        for(int j=0; j<cnt[i]/2; j++)
            res+=i;
    cout<<res;
}


#include<iostream>
#include<string>
#include<cstring>
#include<set>
#include<cstdio>
#include<map>
#include<unordered_map>
#include<ctime>
#include<deque>
#include<cmath>
#include<queue>
#include<vector>
#include<bitset>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int, int> P;
char s[200222];
int cnt[333];
int main(){
    scanf("%s", &s);
    int kol=0;
    int n=strlen(s);
    for(int i=0; i<n; i++)
        cnt[s[i]]++;
    for(int i='a'; i<='z'; i++)
        kol+=cnt[i]%2;
    while(kol>1){
        for(int i='z'; i>='a'; i--){
            if(cnt[i]%2){
                cnt[i]--;
                for(int j='a'; j<='z'; j++){
                    if(cnt[j]%2){
                        cnt[j]++;
                        break;
                    }
                }
                break;
            }
        }
        kol-=2;
    }
    string hp="";
    for(int i='a'; i<='z'; i++)
        if(cnt[i]%2)
            hp+=i;
    string res;
    for(int i='a'; i<='z'; i++)
        for(int j=0; j<cnt[i]/2; j++)
            res+=i;
    cout<<res;
    res="";
    cout<<hp;
    for(int i='z'; i>='a'; i--)
        for(int j=0; j<cnt[i]/2; j++)
            res+=i;
    cout<<res;
}


#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

#define uchar unsigned char
#define ushort unsigned short
#define uint unsigned int
#define ll long long
#define ull unsigned ll

#define E 2.718281828
#define PI 3.14159265358979323846264338328

string s;
int cnt[26];

int main() {
	ios::sync_with_stdio(false);
	cin >> s;
	for (int i = 0; i < 26; i++)
		cnt[i] = 0;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	vector<int> odd;
	for (int i = 0; i < 26; i++)
		if (cnt[i] % 2)
			odd.push_back(i);
	while (odd.size() >= 2) {
		cnt[*(odd.begin())]++;
		cnt[*(odd.rbegin())]--;
		odd.clear();
		for (int i = 0; i < 26; i++)
			if (cnt[i] % 2)
				odd.push_back(i);
	}
	char ch = 0;
	if (!odd.empty()) {
		ch = 'a' + odd[0];
		cnt[odd[0]]--;
	}
	for (int i = 0; i < 26; i++)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	if (ch)
		cout << ch;
	for (int i = 26; i >= 0; i--)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	cout << endl;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

#define uchar unsigned char
#define ushort unsigned short
#define uint unsigned int
#define ll long long
#define ull unsigned ll

#define E 2.718281828
#define PI 3.14159265358979323846264338328

string s;
int cnt[26];

int main() {
	ios::sync_with_stdio(false);
	cin >> s;
	for (int i = 0; i < 26; i++)
		cnt[i] = 0;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	vector<int> odd;
	for (int i = 0; i < 26; i++)
		if (cnt[i] % 2)
			odd.push_back(i);
	while (odd.size() >= 2) {
		cnt[*(odd.begin())]++;
		cnt[*(odd.rbegin())]--;
		odd.clear();
		for (int i = 0; i < 26; i++)
			if (cnt[i] % 2)
				odd.push_back(i);
	}
	char ch = 0;
	if (!odd.empty()) {
		ch = 'a' + odd[0];
		cnt[odd[0]]--;
	}
	for (int i = 0; i < 26; i++)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	if (ch)
		cout << ch;
	for (int i = 26; i >= 0; i--)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

#define uchar unsigned char
#define ushort unsigned short
#define uint unsigned int
#define ll long long
#define ull unsigned ll

#define E 2.718281828
#define PI 3.14159265358979323846264338328

string s;
int cnt[26];

int main() {
	ios::sync_with_stdio(false);
	cin >> s;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	vector<int> odd;
	for (int i = 0; i < 26; i++)
		if (cnt[i] % 2)
			odd.push_back(i);
	while (odd.size() >= 2) {
		cnt[*(odd.begin())]++;
		cnt[*(odd.rbegin())]--;
		odd.clear();
		for (int i = 0; i < 26; i++)
			if (cnt[i] % 2)
				odd.push_back(i);
	}
	char ch = 0;
	if (!odd.empty()) {
		ch = 'a' + odd[0];
		cnt[odd[0]]--;
	}
	for (int i = 0; i < 26; i++)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	if (ch)
		cout << ch;
	for (int i = 26; i >= 0; i--)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	cout << endl;
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <utility>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

#define uchar unsigned char
#define ushort unsigned short
#define uint unsigned int
#define ll long long
#define ull unsigned ll

#define E 2.718281828
#define PI 3.14159265358979323846264338328

string s;
int cnt[26];

int main() {
	ios::sync_with_stdio(false);
	cin >> s;
	for (int i = 0; i < 26; i++)
		cnt[i] = 0;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	vector<int> odd;
	for (int i = 0; i < 26; i++)
		if (cnt[i] % 2)
			odd.push_back(i);
	while (odd.size() >= 2) {
		cnt[odd[0]]++;
		cnt[odd[odd.size() - 1]]--;
		odd.clear();
		for (int i = 0; i < 26; i++)
			if (cnt[i] % 2)
				odd.push_back(i);
	}
	char ch = 0;
	if (!odd.empty()) {
		ch = 'a' + odd[0];
		cnt[odd[0]]--;
	}
	for (int i = 0; i < 26; i++)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	if (ch)
		cout << ch;
	for (int i = 25; i >= 0; i--)
		for (int j = 0; 2 * j < cnt[i]; j++)
			cout << (char)('a' + i);
	cout << endl;
	return 0;
}


#include <iostream>
#include<string>
using namespace std;

int main() {
	int f[26] ={};
	string s ;
	cin>>s ;
	for(int i=0 ; i < s.size() ; i++){
		f[s[i]-'a' ] ++ ;

	}
	bool b = false ;
	int x =0  ;
if(s.size() %2==0) b = true ;

	for(int i=0 ; i < s.size() ; i++){
if(f[i]%2==1) {
if(!b) {

b=true ;

}
else

	x++ ;
}
	}
x/=2 ;

for(int  i=0 ; i < s.size() ; i++){
	if(x && f[i]%2==1){
		f[i]++;
		x-- ;
	}
}

string ans ="" ;
b=false;
int  y ;
for(int i=0 ; i < s.size() ; i++){
	if(!b && f[i]%2==1 ){
		b=true ;
	y= i ;
	}

	while(f[i]>1){
ans+=(i+'a') ;
		f[i]/=2 ;

	}

}
cout<<ans;
if(s.size() %2==1 )
cout<<(char )(y+'a') ;
for(int i= ans.size()-1 ;  i >=0 ; i--) cout<<ans[i] ;
// your code goes here
	return 0;
}


#include <iostream>
#include<string>
#include<vector>
using namespace std;
vector<int > V ;

int main() {
	int f[26] ={};
	string s ;
	cin>>s ;
	for(int i=0 ; i < s.size() ; i++){
		f[s[i]-'a' ] ++ ;

	}

	for(int  i=0 ;  i< 26 ; i++)
	{
		if(f[i] %2==1 ) {

		V.push_back(i) ;

	}}
for(int  i=0 ;  i< V.size()/2 ; i++){
	f[V[i]]++ ;
	f[V[V.size()-i-1] ]-- ;
}

	string ans = "" ;
	for(int i=0 ; i < 26 ; i++){

	while(f[i]>1){
ans+=(i+'a') ;
		f[i]-=2 ;

	}
	}

cout<<ans;
if(s.size() %2==1 )
cout<<(char )(V[V.size()/2 ] +'a') ;
for(int i= ans.size()-1 ;  i >=0 ; i--) cout<<ans[i] ;
// your code goes here11
	return 0;
}


#include <iostream>
#include<string>
#include<vector>
using namespace std;
vector<int > V ;

int main() {
	int f[26] ={};
	string s ;
	cin>>s ;
	for(int i=0 ; i < s.size() ; i++){
		f[s[i]-'a' ] ++ ;

	}

	for(int  i=0 ;  i< 26 ; i++)
	{
		if(f[i] %2==1 )
		V.push_back(i) ;
	}
for(int  i=0 ;  i< V.size()/2 ; i++){
	f[V[i]]++ ;
	f[V[V.size()-i-1] ]-- ;
}

	string ans = "" ;
	for(int i=0 ; i < s.size() ; i++){

	while(f[i]>1){
ans+=(i+'a') ;
		f[i]/=2 ;

	}
	}

cout<<ans;
if(s.size() %2==1 )
cout<<(char )(V[V.size()/2 + 1] +'a') ;
for(int i= ans.size()-1 ;  i >=0 ; i--) cout<<ans[i] ;
// your code goes here11
	return 0;
}


#include <iostream>
#include<string>
#include<vector>
using namespace std;
vector<int > V ;

int main() {
	int f[26] ={};
	string s ;
	cin>>s ;
	for(int i=0 ; i < s.size() ; i++){
		f[s[i]-'a' ] ++ ;

	}

	for(int  i=0 ;  i< 26 ; i++)
	{
		if(f[i] %2==1 )
		V.push_back(i) ;
	}
for(int  i=0 ;  i< V.size()/2 ; i++){
	f[V[i]]++ ;
	f[V[V.size()-i-1] ]-- ;
}

	string ans = "" ;
	for(int i=0 ; i < s.size() ; i++){

	while(f[i]>1){
ans+=(i+'a') ;
		f[i]/=2 ;

	}
	}

cout<<ans;
if(s.size() %2==1 )
cout<<(char )(V[V.size()/2 ] +'a') ;
for(int i= ans.size()-1 ;  i >=0 ; i--) cout<<ans[i] ;
// your code goes here11
	return 0;
}


#include <iostream>
#include<string>
#include<vector>
using namespace std;
vector<int > V ;

int main() {
	int f[26] ={};
	string s ;
	cin>>s ;
	for(int i=0 ; i < s.size() ; i++){
		f[s[i]-'a' ] ++ ;

	}

	for(int  i=0 ;  i< 26 ; i++)
	{
		if(f[i] %2==1 )
		V.push_back(i) ;
	}
for(int  i=0 ;  i< V.size()/2 ; i++){
	f[i]++ ;
	f[V.size()-i-1 ]-- ;
}

	string ans = "" ;
	for(int i=0 ; i < s.size() ; i++){

	while(f[i]>1){
ans+=(i+'a') ;
		f[i]/=2 ;

	}
	}

cout<<ans;
if(s.size() %2==1 )
cout<<(char )(V[V.size()/2 + 1] +'a') ;
for(int i= ans.size()-1 ;  i >=0 ; i--) cout<<ans[i] ;
// your code goes here11
	return 0;
}


#include <iostream>
#include <string>
using namespace std;

string s,sf;
int occ[28],chr[28];
int main() {
//	freopen("f.txt","r",stdin);
	cin >> s;
	for(int i = 0; i < s.size(); i++)
		occ[s[i] - 'a']++;
	bool odd = (s.size()) & 1;
	int c = 0;
	memset(chr,-1,sizeof(chr));
	for(int i = 0; i < 27; i++)
		if(occ[i] != 0 && (occ[i] & 1))
			chr[c++] = i;

	if( c > 0) {
		if(odd == 0) {
			for(int i = 0; i < c / 2; i++)
				occ[chr[i]] ++,
				occ[chr[i + c / 2]] --;
		}
		if(odd == 1 && c > 1) {
			for(int i = 0; i < c / 2; i++)
				occ[chr[i]] ++,
				occ[chr[i + c / 2 + 1]] --;
		}
	}
	for(int i = 0; i < 27; i++) {
		if(occ[i]) {
			for(int j = 0; j < occ[i] / 2; j++)
				sf += (i + 'a');
		}
	}
	if(odd == 1) {
		for(int i = 0; i < 27; i++)
			if(occ[i] & 1) {
				sf += i + 'a';
				break;
			}
	}
	for(int i = 26; i >= 0; i--) {
		if(occ[i]) {
			for(int j = 0; j < occ[i] / 2; j++)
				sf += (i + 'a');
		}
	}
	cout << sf << '\n';

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#pragma comment(linker, "/STACK:640000000")

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <bitset>
#include <unordered_set>
#include <unordered_map>

using namespace std;

#define forn(i, n) for(int i = 0; i < (int)(n); i++)
#define forn1(i, n) for(int i = 1; i <= (int)(n); i++)
#define forr(i, l, r) for(int i = int(l); i <= int(r); i++)
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)((a).size())
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define y1 __y1
#define sqr(x) ((x) * (x))

typedef long long li;
typedef double ld;
typedef pair<int, int> pt;

const int INF = (int)(1e9);
const li INF64 = (li)(INF)* (li)(INF);
const ld eps = 1e-9;
const ld pi = ld(3.1415926535897932384626433832795);

inline bool in(int i, int j, int n, int m) {
    return i >= 1 && i <= n && j >= 1 && j <= m;
}

inline int myrand() {
    return (rand() ^ (rand() << 15));
}

const int dx[] = { 0, -1, 1, 0 };
const int dy[] = { -1, 0, 0, 1 };

//vsyakaya xernya

template <typename T1, typename T2>
inline ostream& operator <<(ostream &out, const pair<T1, T2> &a) {
    return out << "(" << a.x << "," << a.y << ")";
}

template <typename T>
inline void outArr(const T a[], int n) {
#ifdef _DEBUG
    cerr << " == " << n << " : ";
    forn(i, n) cerr << a[i] << ", "; cerr << endl;
#endif
}

template <typename T>
inline void out(const T &a) {
#ifdef _DEBUG
    cerr << " == " << a << endl;
#endif
}

template <typename T1, typename T2>
inline void out(const pair<T1, T2> &a) {
#ifdef _DEBUG
    cerr << " == " << a.x << ' ' << a.y << endl;
#endif
}

template <typename T>
inline void out(const vector<T> &a) {
#ifdef _DEBUG
    cerr << " == " << sz(a) << " : ";
    for (const auto &x : a) cerr << x << ", "; cerr << endl;
#endif
}

template <typename T>
inline void out(const set<T> &a) {
#ifdef _DEBUG
    cerr << " == " << sz(a) << " : ";
    for (const auto &x : a) cerr << x << ", "; cerr << endl;
#endif
}

#ifdef _DEBUG
#define err(x) { cerr << #x; out(x); }
#define print(x, n) { cerr << #x; outArr(x, n); }
#else
#define err(x) {}
#define print(x, n) {}
#endif

const int N = 2e5 + 555;

string s;

inline void gen() {
    return;
}

inline bool read() {
    cin >> s;
    return true;
}

inline bool check(const string &s) {
    int l = 0, r = sz(s) - 1;
    while (l < r) {
        if (s[l] != s[r]) return false;
        l++, r--;
    }

    return true;
}

int cnt[256];

inline void solve() {
    int n = sz(s);
    forn(i, n) cnt[s[i]]++;
    int odd = 0;
    vector<int> Odd;
    forn(i, 256) if (cnt[i] & 1) Odd.push_back(i);
    if (sz(Odd) > 1) {
        //reverse(all(Odd));
        int l = 0, r = sz(Odd) - 1;
        while (l < r) {
            cnt[Odd[l]]++;
            cnt[Odd[r]]--;
            l++, r--;
        }
    }

    string ans;
    ans.erase();
    int mid = -1;
    forn(i, 256) if (cnt[i] & 1) mid = i;
    forn(i, 256) {
        forn(j, cnt[i] / 2) ans += char(i);
    }

    if (mid > 0) ans += char(mid);

    for(int i = 255; i >= 0; i--) {
        forn(j, cnt[i] / 2) ans += char(i);
    }

    assert(check(ans));
    cout << ans << endl;
    return;
}

int main() {
#ifdef _DEBUG
    assert(freopen("input.txt", "rt", stdin));
    assert(freopen("output.txt", "wt", stdout));
#endif

    cout << setprecision(10) << fixed;
    cerr << setprecision(10) << fixed;

    srand(int(time(NULL)));

    int T = 1;
    //assert(scanf("%d", &T) == 1);

    forn(i, T) {
        //cerr << "TEST == " << i + 1 << endl;
        assert(read());
        solve();
    }

#ifdef _DEBUG
    cerr << "TIME == " << clock() << " ms" << endl;
#endif
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int letter[26];

int main() {
#ifdef _DEBUG
	freopen("../input.txt", "r", stdin);
	freopen("../output.txt", "w", stdout);
#endif
	string s;
	cin >> s;
	for (int i = 0; i < s.length(); ++i) {
		++letter[s[i] - 'a'];
	}
	int odd = 0;
	for (int i = 0; i < 26; ++i) {
		if (letter[i] % 2 == 1) {
			++odd;
		}
	}
	int cnt = 1;
	for (int i = 0; i < 26; ++i) {
		if (letter[i] % 2 == 1) {
			if (cnt <= (odd / 2)) {
				++letter[i];
			}
			else {
				if (cnt != ((odd + 1) / 2)) {
					--letter[i];
				}
			}
			++cnt;
		}
	}
	char mid = '0';
	char cur;
	for (int i = 0; i < 26; ++i) {
		for (int j = 0; j < letter[i] / 2; ++j) {
			cur = 'a' + i;
			cout << cur;
		}
		if (letter[i] % 2 == 1) {
			mid = 'a' + i;
		}
	}
	if (mid != '0') {
		cout << mid;
	}
	for (int i = 25; i >= 0; --i) {
		for (int j = 0; j < letter[i] / 2; ++j) {
			cur = 'a' + i;
			cout << cur;
		}
	}
	return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <stdlib.h>
#include <sstream>
#include <assert.h>
#include <memory.h>
#include <complex>
#include <time.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;

#define mp make_pair
#define pb push_back
#define ll long long
#define sz(x) (int)(x).size()

int cnt[26];
int tmpcnt[26];

vector<string> vars[50];

int main() {
    //freopen("periods.in","rt",stdin);
	//freopen("periods.out","wt",stdout);

	string s;
	cin >> s;
	for(int i = 0; i < sz(s); i++) cnt[s[i]-'a']++;

	if(sz(s) % 2 == 0) {
		vector<int> nech;
		for(int i = 0; i < 26; i++) {
			if(cnt[i] % 2 == 1) nech.pb(i);
		}
		for(int i = sz(nech)/2; i < sz(nech); i++) {
			cnt[nech[i]]--;
			cnt[nech[i-sz(nech)/2]]++;
		}
		for(int i = 0; i < 26; i++) {
			for(int j = 0; j < cnt[i] / 2; j++) printf("%c", i + 'a');
		}
		for(int i = 25; i >= 0; i--) {
			for(int j = 0; j < cnt[i] / 2; j++) printf("%c", i + 'a');
		}
		return 0;
	}

	for(int xxx = 0; xxx < 26; xxx++) {
		if(cnt[xxx]) {
			for(int i = 0; i < 26; i++) tmpcnt[i] = cnt[i];
			char mid = xxx + 'a';
			tmpcnt[xxx]--;

			string t = "";

			int wtf = 0;

			vector<int> nech;
			for(int i = 0; i < 26; i++) {
				if(tmpcnt[i] % 2 == 1) nech.pb(i);
			}
			for(int i = sz(nech)/2; i < sz(nech); i++) {
				tmpcnt[nech[i]]--;
				tmpcnt[nech[i-sz(nech)/2]]++;
				wtf++;
			}
			for(int i = 0; i < 26; i++) {
				for(int j = 0; j < tmpcnt[i] / 2; j++) t += (char)(i + 'a');
			}
			t += mid;
			for(int i = 25; i >= 0; i--) {
				for(int j = 0; j < tmpcnt[i] / 2; j++) t += (char)(i + 'a');
			}
			vars[wtf].pb(t);
		}
	}

	for(int i = 0; i < 50; i++) {
		if(sz(vars[i]) != 0) {
			string res = vars[i][0];
			for(int j = 1; j < sz(vars[i]); j++) {
				res = min(res, vars[i][j]);
			}
			cout << res << endl;
			return 0;
		}
	}

    return 0;
}


#include <iostream>
#include <stdio.h>
#include <numeric>
#include <queue>
#include <string>
#include <cmath>
#include <vector>
#include <deque>
#include <iomanip>
#include <set>
#include <queue>
#include <bitset>
#include <iomanip>
#include <map>
#include <string.h>
#include <stack>
#include <algorithm>

using namespace std;

struct node
{
	char ch;
	int cnt;

	node(char ch , int cnt)
	{
		this -> ch = ch;
		this -> cnt = cnt;
	}
};

bool cmp(node n1 , node n2)
{
	if (n1.ch < n2.ch)
		return true;
	else
		return false;
}

char s[200010];
int cnt[30];
vector<node> even;
vector<node> odd;
vector<int> output;

int main()
{
	int i , j , n;
	while (scanf("%s" , s) != EOF)
	{
		even.clear();
		odd.clear();
		memset(cnt , 0 , sizeof(cnt));
		output.clear();

		n = strlen(s);
		for (i = 0;i < n;i ++)
		{
			int index = s[i] - 'a';
			cnt[index] ++;
		}
		for (i = 0;i < 26;i ++)
		{
			// 如果是偶数
			if (cnt[i] % 2 == 0)
				even.push_back(node((char) (i + 'a') , cnt[i]));
			// 如果是奇数
			else
				odd.push_back(node((char) (i + 'a') , cnt[i]));
		}
		// 排序
		sort(even.begin() , even.end() , cmp);
		sort(odd.begin() , odd.end() , cmp);
		memset(cnt , 0 , sizeof(cnt));
		// 奇数的两两组合，大的变小的，剩下的不管
		for (i = 0;i < odd.size() / 2;i ++)
		{
			int index1 = i , index2 = odd.size() - i - 1;
			// 更新
			odd[index1].cnt ++;
			odd[index2].cnt --;
		}
		for (i = 0;i < odd.size();i ++)
			cnt[(int) (odd[i].ch - 'a')] = odd[i].cnt;
		for (i = 0;i < even.size();i ++)
			cnt[(int) (even[i].ch - 'a')] = even[i].cnt;
		// 输出cnt
		int temp = - 1;
		for (i = 0;i < 26;i ++)
		{
			if (cnt[i] > 0)
			{
				if (cnt[i] % 2 == 0)
				{
					for (j = 0;j < cnt[i] / 2;j ++)
						output.push_back(i);
				}
				else
				{
					temp = i;
					for (j = 0;j < cnt[i] / 2;j ++)
						output.push_back(i);
				}
			}
		}
		for (i = 0;i < output.size();i ++)
		{
			char ch = (char) (output[i] + 'a');
			printf("%c" , ch);
		}
		if (temp >= 0)
			printf("%c" , (char) (temp + 'a'));
		for (i = output.size() - 1;i >= 0;i --)
		{
			char ch = (char) (output[i] + 'a');
			printf("%c" , ch);
		}
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {
		int* mass = new int[count];
		for (int i = 0; i < count; i++) {
			mass[i] = 0;
		}
		int t = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				mass[t] = freq[i];
				t++;
			}
		}
		/////////////////////
		for (int i = 0; i < count/2; i++) {
			if (mass[count - i-1] == 1) {
				mass[count - i - 1]--;
				mass[i]++;

			}
			else {
				for (int j = i; j < count / 2; j++) {
					mass[j]++;
					mass[count - j - 2]--;
				}
				break;
			}
		}

		/////////////////////////

		int r = 0;
		for (int i = 0; i < freq.size(); i++) {
			if (freq[i] % 2 == 1) {
				freq[i] = mass[r];
				r++;
			}
		}

		//////////////////////////
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0 && freq[i]%2==0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;
	}

	//system("pause");
	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

struct symbol {
	char ch;
	int freq;
	symbol(char s,int f) {
		ch = s;
		freq = f;
	}
};

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {

		int* fr = new int[count];
		int j1 = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				int number = freq[i];
				fr[j1] = number;
				j1++;
			}
		}

		int del = 0;
		for (int i = (count + 1) / 2; i < count; i++) {
			if (fr[i] == 1) {
				fr[i] = 0;
				del++;
			}
		}
		int t = 0;
		while (del != 0) {
			fr[t]++;
			t++;
			del = del-1;
		}

		for (int i = 0; i < (count - 1) / 2; i++) {
			if (fr[i] % 2 == 1) {
				fr[i]++;
				for (int j = (count - 1) / 2; j < count; j++) {
					if (fr[j] % 2 == 1) {
						fr[j]--;
						break;
					}
				}
			}
		}

		int q = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				freq[i] = fr[q];
				q++;
			}
		}

		//////////////////////////
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0 && freq[i]%2==0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;
	}

	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {
		int g = 25;

		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {

							freq[i]++;
							freq[g]--;
							g--;
							break;

					}
				}
			}
		}

		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0 && freq[i]%2==0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;
	}

	//system("pause");
	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

struct symbol {
	char ch;
	int freq;
	symbol(char s,int f) {
		ch = s;
		freq = f;
	}
};

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {
		vector<int> freq2 = freq;
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq2[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq2[g] % 2 == 1) {
						freq2[i]++;
						freq2[g]--;
						g--;
						break;
					}
				}
			}
		}

		int* fr = new int[count];
		int j1 = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				int number = freq[i];
				fr[j1] = number;
				j1++;
			}
		}

		int del = 0;
		for (int i = (count + 1) / 2; i < count; i++) {
			if (fr[i] == 1) {
				fr[i] = 0;
				del++;
			}
		}
		int t = 0;
		while (del != 0) {
			fr[t]++;
			t++;
			del = del-1;
		}

		for (int i = 0; i < (count - 1) / 2; i++) {
			if (fr[i] % 2 == 1) {
				fr[i]++;
				for (int j = (count - 1) / 2; j < count; j++) {
					if (fr[j] % 2 == 1) {
						fr[j]--;
						break;
					}
				}
			}
		}

		int q = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				freq[i] = fr[q];
				q++;
			}
		}

		//////////////////////////
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0 && freq[i]%2==0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		vector<char> res2(s.size());
		int j11 = 0;
		for (int i = 0; i < 26; i++) {
			if (freq2[i] != 0 && freq2[i] % 2 == 0) {
				while (freq2[i] != 0) {
					res2[j11] = char(97 + i);
					res2[s.size() - j11 - 1] = char(97 + i);
					j11++;
					freq2[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq2[i] % 2 == 1) {
				while (freq2[i] != 0) {
					res2[j11] = char(97 + i);

					j11++;
					freq2[i] -= 1;
				}
			}
		}

		int flag = 0;
		for (int i = 0; i < res2.size(); i++) {
			if (res2[i] == res[i]) {
				continue;
			}
			int r1 = int(res[i]);
			int r2 = int(res2[i]);
			if (r1 > r2) {
				flag = 1;
				break;
			}
			if (r2 > r1) {
				flag = -1;
				break;
			}
		}

		if (flag == 1) {
			for (int i = 0; i < res.size(); i++) {
				cout << res2[i];
			}
			cout << endl;
		}
		if (flag == -1 || flag == 0) {
			for (int i = 0; i < res.size(); i++) {
				cout << res[i];
			}
			cout << endl;
		}

	}

	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {
		int g = 25;
		int flag = 1;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						if (flag == 0) {
							freq[i]++;
							freq[g]--;
							g--;
							break;
						}
						else {
							flag = 0;
						}
					}
				}
			}
		}

		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0 && freq[i]%2==0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;
	}

	//system("pause");
	return 0;
}


#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

struct symbol {
	char ch;
	int freq;
	symbol(char s,int f) {
		ch = s;
		freq = f;
	}
};

int main() {
	string s;
	cin >> s;
	vector<char> row;

	for (int i = 0; i < s.size(); i++) {
		row.push_back(s[i]);
	}

	sort(row.begin(), row.end());

	vector<int> freq(26,0);
	for (int i = 0; i < 26; i++) {
		char ch1 = 97 + i;
		if (i == 0) {
			freq[i] = distance(row.begin(), upper_bound(row.begin(), row.end(), ch1));
			continue;
		}
		char ch2 = 97 + i - 1;
		freq[i] = distance(upper_bound(row.begin(), row.end(), ch2), upper_bound(row.begin(), row.end(), ch1));
	}

	vector<char> res(s.size());

	int count = 0;
	for (int i = 0; i < freq.size(); i++) {
		if (freq[i] % 2 == 1) {
			count++;
		}
	}

	if (count % 2 == 0) {
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq[g] % 2 == 1) {
						freq[i]++;
						freq[g]--;
						g--;
						break;
					}
				}
			}
		}
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}

		for (int i = 0; i < res.size(); i++) {
			cout << res[i];
		}
		cout << endl;

	}
	else {
		vector<int> freq2 = freq;
		int g = 25;
		for (int i = 0; i <= g; i++) {
			if (freq2[i] % 2 == 1) {
				for (g; g > i; g--) {
					if (freq2[g] % 2 == 1) {
						freq2[i]++;
						freq2[g]--;
						g--;
						break;
					}
				}
			}
		}

		int* fr = new int[count];
		int j1 = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				int number = freq[i];
				fr[j1] = number;
				j1++;
			}
		}

		int del = 0;
		for (int i = (count + 1) / 2; i < count; i++) {
			if (fr[i] == 1) {
				fr[i] = 0;
				del++;
			}
		}
		int t = 0;
		while (del != 0) {
			fr[t]++;
			t++;
			del = del-1;
		}

		for (int i = 0; i < (count - 1) / 2; i++) {
			if (fr[i] % 2 == 1) {
				fr[i]++;
				for (int j = (count - 1) / 2; j < count; j++) {
					if (fr[j] % 2 == 1) {
						fr[j]--;
						break;
					}
				}
			}
		}

		int q = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				freq[i] = fr[q];
				q++;
			}
		}

		//////////////////////////
		int j = 0;
		for (int i = 0; i < 26; i++) {
			if (freq[i] != 0) {
				while (freq[i] >1) {
					res[j] = char(97 + i);
					res[s.size() - j - 1] = char(97 + i);
					j++;
					freq[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq[i] % 2 == 1) {
				while (freq[i] != 0) {
					res[j] = char(97 + i);

					j++;
					freq[i] -= 1;
				}
			}
		}

		vector<char> res2(s.size());
		int j11 = 0;
		for (int i = 0; i < 26; i++) {
			if (freq2[i] != 0) {
				while (freq2[i] >1) {
					res2[j11] = char(97 + i);
					res2[s.size() - j11 - 1] = char(97 + i);
					j11++;
					freq2[i] -= 2;
				}
			}
		}
		for (int i = 0; i < 26; i++) {
			if (freq2[i] % 2 == 1) {
				while (freq2[i] != 0) {
					res2[j11] = char(97 + i);

					j11++;
					freq2[i] -= 1;
				}
			}
		}

		int flag = 0;
		for (int i = 0; i < res2.size(); i++) {
			if (res2[i] == res[i]) {
				continue;
			}
			int r1 = int(res[i]);
			int r2 = int(res2[i]);
			if (r1 > r2) {
				flag = 1;
				break;
			}
			if (r2 > r1) {
				flag = -1;
				break;
			}
		}

		if (flag == 1) {
			for (int i = 0; i < res.size(); i++) {
				cout << res2[i];
			}
			cout << endl;
		}
		if (flag == -1 || flag == 0) {
			for (int i = 0; i < res.size(); i++) {
				cout << res[i];
			}
			cout << endl;
		}

	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <ctime>
using namespace std;
int main(){
	string s;
	getline(cin,s);
	vector<int> v(27,0);
	int l=s.size();
	for (int i=0;i<l;i++){
		v[(s[i]-'0'-48)]++;
	}
	string w="";
	char k;
	for (int i=1;i<27;i++){
		if (v[i]>1){
			for (int j=0;j<v[i]/2;j++){
				k=((i+48)+'0');
				w=w+k;
			}
			v[i]=v[i]%2;

		}
	}
	for (int i=26;i>=1;i--){
		if (v[i]==1){
			for (int j=1;j<i;j++)
				if(v[j]==1){
						k=((j+48)+'0');
						w=w+k;
						v[j]--;
						v[i]--;
						break;
					}
		}
	}

	cout<<w;
	int t=0;
	for (int i=1;i<27;i++){
		if(v[i]==1){
			k=((i+48)+'0');
			t++;
		}
	}
	if (t>0)
	cout<<k;
	for (int i=w.size()-1;i>=0;i--)
		cout<<w[i];
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <ctime>
using namespace std;
int main(){
	string s;
	getline(cin,s);
	vector<int> v(27,0);
	int l=s.size();
	for (int i=0;i<l;i++){
		v[(s[i]-'0'-48)]++;
	}
	string w="";
	char k;
	for (int i=1;i<27;i++){
		if (v[i]>1){
			for (int j=0;j<v[i]/2;j++){
				k=((i+48)+'0');
				w=w+k;
			}
			v[i]=v[i]%2;

		}
		if (v[i]==1){
				for (int j=1;j<i;j++)
					if(v[j]==1){
						k=((j+48)+'0');
						w=w+k;
						v[j]--;
						v[i]--;
					}
			}
	}
	cout<<w;
	int t=0;
	for (int i=1;i<27;i++){
		if(v[i]==1){
			k=((i+48)+'0');
			t++;
		}
	}
	if (t>0)
	cout<<k;
	for (int i=w.size()-1;i>=0;i--)
		cout<<w[i];
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <ctime>
using namespace std;
int main(){
	string s;
	getline(cin,s);
	vector<int> v(27,0);
	vector<int> e(27,0);
	int l=s.size();
	for (int i=0;i<l;i++){
		v[(s[i]-'0'-48)]++;
	}
	string w="";
	char k;
	for (int i=1;i<27;i++){
		if (v[i]==1){
			e[i]=1;
			v[i]=0;
		}
		if (v[i]>1){
			e[i]=v[i]%2;
			v[i]=v[i]/2;

		}

	}
	for (int i=26;i>=1;i--){
		if (e[i]==1){
			for (int j=1;j<i;j++)
				if(e[j]==1){
					v[j]++;
					e[j]=0;
					e[i]=0;
					break;
				}
		}
	}
	char kk;
	int t=0;
	for (int i=1;i<27;i++){
		if (e[i]==1){
			kk=(i+48)+'0';
			t++;
		}
		for (int q=0;q<v[i];q++){
			k=((i+48)+'0');
			w=w+k;
		}
	}
	cout<<w;
	if (t>0)
	cout<<kk;
	for (int i=w.size()-1;i>=0;i--)
		cout<<w[i];

}


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <ctime>
#include <cassert>
#include <algorithm>
#include <cmath>

//#include <unordered_set>
//#include <unordered_map>

#define forn(i, n) for (int i = 0; i < int(n); i++)
#define for1(i, n) for (int i = 1; i < int(n); i++)
#define forft(i, n) for (int i = int(from); i < int(to); i++)
#define forr(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define sz(a) int(a.size())
#define all(a) a.begin(), a.end();
#define ms(a, v) memset(a, v, sizeof(a))
#define correct(x, y, n, m) (x >= 0 && x < n && y >= 0 && y < m)

using namespace std;

template<typename T> T sqr(const T &x) {
	return x * x;
}

typedef long long ll;
typedef long long li;
typedef pair<int, int> pt;
typedef long double ld;
typedef pair<ld, ld> pd;

const int INF = int(1e9);
const ll INF_LL = ll(4e18);
const ll INF64 = ll(4e18);
const ll LINF = ll(4e18);
const ld EPS = 1e-8;

const int N = 2e5 + 10;
const int M = 2e5 + 10;

int cnt[26];

void solve() {
	string s;

	cin >> s;

	forn(i, sz(s)) {
		cnt[s[i] - 'a']++;
	}

	int l = 0, r = 25;

	while (true) {
		while (l < 26 && !(cnt[l] & 1)) {
			++l;
		}

		while (r >= 0 && !(cnt[r] & 1)) {
			--r;
		}

		if (l == r || r < 0) {
			break;
		}

		cnt[l]++;
		cnt[r]--;
	}

	string ans = "";

	int pos = -1;

	forn(i, 26) {
		forn(j, cnt[i] / 2) {
			ans.pb(i + 'a');
		}

		if (cnt[i] % 2 == 1) {
			pos = i;
		}
	}

	if (pos != -1) {
		ans.pb(pos + 'a');
	}

	forr(i, 26) {
		forn(j, cnt[i] / 2) {
			ans.pb(i + 'a');
		}
	}

	cout << ans << endl;
}

int main() {
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);

	srand((int) time(NULL));
	cout << setprecision(10) << fixed;

	solve();
	return 0;
}


#pragma warning(disable:4996)
#include<stdio.h>
#include<iostream>
#include<string>
using std::cout;
using std::cin;
using std::string;
int cnt[30];
string s;
int main()
{
	cin >> s;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	int cur = 0;
	for (int i = 25; i >= 0; i--)
	{
		if (cnt[i] & 1)
		for (int j = 0; j < i; j++)
		if (cnt[j] & 1)
		{
			cnt[i]--;
			cnt[j]++;
			break;
		}
		if (cnt[i] & 1)
		{
			cur = i;
			break;
		}
	}
	for (int i = 0; i < 26;i++)
	for (int j = 0; j < cnt[i] / 2; j++)
		cout << char(i + 'a');
	if (cur)
		cout << char(cur + 'a');
	for (int i = 25; i >= 0;i--)
	for (int j = 0; j < cnt[i] / 2; j++)
		cout << char(i + 'a');
	return 0;
}


#pragma warning(disable:4996)
#include<stdio.h>
#include<iostream>
#include<string>
using std::cout;
using std::cin;
using std::string;
int cnt[30];
string s;
int main()
{
	cin >> s;
	for (int i = 0; i < s.size(); i++)
		cnt[s[i] - 'a']++;
	int cur = -1;
	for (int i = 25; i >= 0; i--)
	{
		if (cnt[i] & 1)
		for (int j = 0; j < i; j++)
		if (cnt[j] & 1)
		{
			cnt[i]--;
			cnt[j]++;
			break;
		}
		if (cnt[i] & 1)
		{
			cur = i;
			break;
		}
	}
	for (int i = 0; i < 26;i++)
	for (int j = 0; j < cnt[i] / 2; j++)
		cout << char(i + 'a');
	if (cur!=-1)
		cout << char(cur + 'a');
	for (int i = 25; i >= 0;i--)
	for (int j = 0; j < cnt[i] / 2; j++)
		cout << char(i + 'a');
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>

#define LL long long
#define uLL unsigned long long
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define vi vector<int>
#define vLL vector<LL>
#define vs vector<string>
#define fori(n) for(int (i)=0; (i)<n; (i)++)
#define PI 3.14159265356
const LL mod = 1000000007;

using namespace std;

int gcd(int a, int b)
{
    while (b > 0)
        return gcd(b, a%b);
    return a;
}
int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    string s;
    cin >> s;
    vector<int> a(26);
    fori(s.length())
    {
        int tmp = s[i] - 'a';
        a[tmp]++;
    }
    //string tp = "";
    fori(26)
    {
        if (a[i] % 2 == 0)
        {
            continue;
        }
        else
        {
            for (int j = 25; j > i; j--)
            {
                if (a[j] % 2 == 1)
                {
                    a[j]--;
                    a[i]++;
                    break;
                }
            }

        }
        if (a[i] % 2 == 1)
        {
            s[s.length()  / 2] = (char)(i + 'a');
        }
    }
    //sort(all(tp));
    int cnt = 0;
    fori(26)
    {
        if (a[i] % 2 == 0)
        {
            for (int j = 0; j < a[i] / 2; j++)
            {
                s[cnt] = (char)(i + 'a');
                s[s.length()-cnt-1]= (char)(i + 'a');
                cnt++;
            }
        }
    }
    cout << s;
    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <memory.h>
#include <algorithm>
#include <functional>
#include <numeric>
#include <sstream>
#include <iterator>
#include <stack>

#pragma comment(linker, "/STACK:5000000")

typedef long long LL;
#define mems(a, v) memset(a, v, sizeof(a))
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define len(s) (s).length()
#define fori(n) for(int (i)=0; (i)<n; (i)++)
using namespace std;
map<char, int > a, b, c;
string s, ans = "";

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> s;
	int n = s.length();
	for (int i = 0; i < n; ++i) {
		a[s[i]]++;
	}

	for (auto it = a.begin(); it != a.end(); ++it) {
		if (it->second % 2 == 1) {
			b[it->first] = it->second;
		}
		else
		{
			c[it->first] = it->second;
		}
	}

	for (auto it = c.begin(); it != c.end(); ++it) {
		for (int i = 0; i < it->second / 2; ++i) {
			ans += it->first;
		}
	}

	for (auto it = b.begin(); it != b.end(); ++it) {
		if (it->second % 2 == 1) {
			b.rbegin()->second--;
			it->second++;
			if (!b.rbegin()->second) b.erase(b.rbegin()->first);
		}
	}

	string t = "";
	for (auto it = b.begin(); it != b.end(); ++it) {
		if (it->second % 2 == 1) {
			t += it->first;
		}

		for (int i = 0; i < it->second / 2; ++i) {
			ans += it->first;

		}
	}

	cout << ans << t;
	reverse(ans.begin(), ans.end());
	cout << ans;

	return 0;

}


#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <memory.h>
#include <algorithm>
#include <functional>
#include <numeric>
#include <sstream>
#include <iterator>
#include <stack>

#pragma comment(linker, "/STACK:5000000")

typedef long long LL;
#define mems(a, v) memset(a, v, sizeof(a))
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define len(s) (s).length()
#define fori(n) for(int (i)=0; (i)<n; (i)++)
using namespace std;
map<char, int > a, b, c;
string s, ans = "";

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> s;
	int n = s.length();
	for (int i = 0; i < n; ++i) {
		a[s[i]]++;
	}

	for (auto it = a.begin(); it != a.end(); ++it) {
		if (it->second % 2 == 1) {
			b[it->first] = it->second;
		}
		else
		{
			c[it->first] = it->second;
		}
	}

	int k = 1;

	for (auto it = b.begin(); it != b.end(); ++it) {
		if (k <= b.size() / 2) {
			it->second++;
		}
		else {
			if (n%2 == 1 && k == b.size()/2+1) {
			}
			else {
				it->second--;
			}
		}
		k++;
	}

	string t = "";
	int p = 0;
	for (auto it = b.begin(); it != b.end(); ++it) {
		if (it->second % 2 == 0 && it->second > 0) c[it->first] = it->second;
		else {
			for (int i = 0; i < it->second; ++i) {
				t += it->first;
			}
		}
	}

	for (auto it = c.begin(); it != c.end(); ++it) {
		for (int i = 0; i < it->second / 2; ++i) {
			ans += it->first;
		}
	}

	cout << ans << t;
	reverse(ans.begin(), ans.end());
	cout << ans;

	return 0;

}


#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <memory.h>
#include <algorithm>
#include <functional>
#include <numeric>
#include <sstream>
#include <iterator>
#include <stack>

#pragma comment(linker, "/STACK:5000000")

typedef long long LL;
#define mems(a, v) memset(a, v, sizeof(a))
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define len(s) (s).length()
#define fori(n) for(int (i)=0; (i)<n; (i)++)
using namespace std;
map<char, int > a, b, c;
string s, ans = "";

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> s;
	int n = s.length();
	for (int i = 0; i < n; ++i) {
		a[s[i]]++;
	}

	for (auto it = a.begin(); it != a.end(); ++it) {
		if (it->second % 2 == 1) {
			b[it->first] = it->second;
		}
		else
		{
			c[it->first] = it->second;
		}
	}

	int k = 1;

	for (auto it = b.begin(); it != b.end(); ++it) {
		if (k <= b.size() / 2) {
			it->second++;
		}
		else {
			if (n%2 == 1 && k == b.size()/2+1) {
			}
			else {
				it->second--;
			}
		}
		k++;
	}

	string t = "";
	int p = 0;
	for (auto it = b.begin(); it != b.end(); ++it) {
		if (it->second % 2 == 0 && it->second > 0) c[it->first] = it->second;
		else {
			if (it->second > 1) {
				c[it->first] = it->second - 1;
				t = it->first;
			}
		}
	}

	for (auto it = c.begin(); it != c.end(); ++it) {
		for (int i = 0; i < it->second / 2; ++i) {
			ans += it->first;
		}
	}

	cout << ans << t;
	reverse(ans.begin(), ans.end());
	cout << ans;

	return 0;

}


#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <memory.h>
#include <algorithm>
#include <functional>
#include <numeric>
#include <sstream>
#include <iterator>
#include <stack>

#pragma comment(linker, "/STACK:5000000")

typedef long long LL;
#define mems(a, v) memset(a, v, sizeof(a))
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define len(s) (s).length()
#define fori(n) for(int (i)=0; (i)<n; (i)++)
using namespace std;
map<char, int > a, b, c;
string s, ans = "";

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> s;
	int n = s.length();
	for (int i = 0; i < n; ++i) {
		a[s[i]]++;
	}

	for (auto it = a.begin(); it != a.end(); ++it) {
		if (it->second % 2 == 1) {
			b[it->first] = it->second;
		}
		else
		{
			c[it->first] = it->second;
		}
	}

	int k = 1;

	for (auto it = b.begin(); it != b.end(); ++it) {
		if (k <= b.size() / 2) {
			it->second++;
		}
		else {
			if (n%2 == 1 && k == b.size()/2+1) {
			}
			else {
				it->second--;
			}
		}
		k++;
	}

	string t = "";
	int p = 0;
	for (auto it = b.begin(); it != b.end(); ++it) {
		if (it->second % 2 == 0 && it->second > 0) c[it->first] = it->second;
		else {
			if (it->second > 1) {
				c[it->first] = it->second - 1;
				t = it->first;
			}
			if (it->second == 1) t = it->first;
		}
	}

	for (auto it = c.begin(); it != c.end(); ++it) {
		for (int i = 0; i < it->second / 2; ++i) {
			ans += it->first;
		}
	}

	cout << ans << t;
	reverse(ans.begin(), ans.end());
	cout << ans;

	return 0;

}