#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
//priority_queue<int,vector<int>,greater<int> > mypq;

struct compare{
    bool operator()(pair<char,int> p1,pair<char,int>p2){
        if(p1.second == p2.second)return (p1.first < p1.first);
        return (p1.second < p2.second);
    }
};
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    string s;
    cin >> s;

    unordered_map<int,int>cnt;
    unordered_map<int,int>::iterator iter;
    for(int i = 0;i<n;i++){
        cnt[s[i]]++;
    }
    priority_queue<pair<char,int>,vector<pair<char,int> >,compare > pq0;
    priority_queue<pair<char,int>,vector<pair<char,int> >,compare > pq1;

    for(iter=cnt.begin();iter!=cnt.end();++iter){
        if(iter->second%2 ==0){
            pq0.push({iter->first,iter->second});
        }
        else{
            pq1.push({iter->first,iter->second});
        }
    }
    string res = "";
    while(!pq0.empty() && !pq1.empty()){
        pair<char,int> p0 = pq0.top();
        pair<char,int> p1 = pq1.top();
        pq0.pop();
        pq1.pop();

        if(p0.second < p1.second)swap(p0,p1);
        int j0 = 0,j1 = 0;
        for(int i = 1;i<=p0.second+p1.second;i++){
            if(j0<p0.second && j1 <p1.second){
                if(i%2!=0){
                    res += p0.first;
                    j0++;
                }
                else{
                    res += p1.first;
                    j1++;
                }
            }
            else if(j0<p0.second){
                res += p0.first;
                j0++;
            }
            else if(j1 < p1.second){
                res += p1.first;
                j1++;
            }
            else break;
        }

    }

    string res0 = "";
    while(!pq0.empty()){
        pair<char,int> p0 = pq0.top();
        pq0.pop();
        for(int i=0;i<p0.second;i++){
            if(i%2==0)res0 += p0.first;
            else res0 = p0.first + res0;
        }
    }
    string res1 = "";
    while(!pq1.empty()){
        pair<char,int> p1 = pq1.top();
        pq1.pop();
        if(pq1.empty()){
            for(int i=0;i<p1.second;i++){
                res1 = p1.first + res1;
            }
        }
        else{
            string res3 = "";
            pair<char,int> p2 = pq1.top();
            pq1.pop();

            int j0 = 0,j1 = 0;
            for(int i = 1;i<=p1.second+p2.second;i++){
                if(j0<p1.second && j1 <p2.second){
                    if(i%2!=0){
                        res += p1.first;
                        j0++;
                    }
                    else{
                        res += p2.first;
                        j1++;
                    }
                }
                else if(j0<p1.second){
                    res += p1.first;
                    j0++;
                }
                else if(j1 < p2.second){
                    res += p2.first;
                    j1++;
                }
                else break;
            }

        }

    }

    res = res + res0 + res1 ;
    cout << res << endl;

}


#include<bits/stdc++.h>

#define ll long long
#define endl '\n'
#define disp(x) cout << (x) << endl
#define pb push_back
#define ff first
#define ss second
#define NOS ios_base::sync_with_stdio(false);cin.tie(NULL);
#define REPI(n) for(int i = 0;i<(n);i++)
#define REPJ(n) for(int j = 0;j<(n);j++)

using namespace std;

/*
//Number Theory-------------

ll int gcd(ll int x,ll int y){
    while(x!=0 && y!=0){
        ll int tmp = x;
        x = y;
        y = tmp%y;
    }
    return x+y;
}
// alter :: use __gcd(A,B)

ll int modExp(ll int x,ll int n,ll int M){

    ll int result=1;
    while(n>0){
        if(n % 2 ==1)
            result=(result * x)%M;
        x=(x*x)%M;
        n=n/2;
    }
    return result;
}

ll int e, x, y;
void extendedEuclid(ll int A, ll int B) {
    if(B == 0) {
        //d = A;
        x = e/A;
        y = 0;
    }
    else {
        extendedEuclid(B, A%B);
        ll int temp = x;
        x = y;
        y = temp - (A/B)*y;
    }
}

ll int modInverse(ll int A, ll int M){

    extendedEuclid(A,M);
    return (x%M+M)%M;    //x may be negative
}

bool checkPrime(int n){
    if(n==1)return 0;
    for(int i = 2;i*i<=n;i++){
        if(n%i==0)return 0;
    }
    return 1;
}

void sieve(bool isPrime[],int n){
    REPI(n+1){
        isPrime[i] = 1;
    }
    isPrime[1] = isPrime[0] = 0;

    for(int i = 2;i*i<=n;i++){
        if(isPrime[i]){
            for(int j = i*i;j<=n;j+=i)isPrime[j] = 0;
        }
    }
}

vector<int> factorize(int n){
    vector<int>res;
    for(int i = 2;i*i<=n;i++){
        while(n%i==0){
            res.pb(i);
            n = n/i;
        }
    }
    if(n!=1)res.pb(n);
    return res;
}

vector<int> fast_factorize(int n){
    int minPrime[n + 1]={0};
    for (int i = 2; i * i <= n; ++i) {
        if (minPrime[i] == 0) {
            for (int j = i * i; j <= n; j += i) {
                if (minPrime[j] == 0) {
                    minPrime[j] = i;
                }
            }
        }
    }
    for (int i = 2; i <= n; ++i) {
        if (minPrime[i] == 0) {
            minPrime[i] = i;
        }
    }
    vector<int> res;
    while (n != 1) {
        res.pb(minPrime[n]);
        n /= minPrime[n];
    }
    return res;
}
*/
/*

// right most once
x^(x&(x-1)) , x&(-x)

// set nth bit 1
x|1<<n
// unset nth bit
x&(!(1<<n))
//check nth bit
x&(1<<n)

//power of 2
n && !(n&(n-1)

// left shift x<<y
// right shift x>>y

*/

//Graphs--------------------

vector<bool>vis;
vector<vector<int> >adj;
vector<int>col;
vector<int>cc[2];

bool dfs(int s,int c){
    vis[s]=1;
    col[s] = c;
    cc[c].pb(s);
    c = 1-c;

    for(int i=0;i<adj[s].size();i++){
        if(!vis[adj[s][i]]){
            if(!dfs(adj[s][i],c)){
                return 0;
            }
        }
        else{
            if(col[adj[s][i]]!=c)return 0;
        }
    }
    return 1;
}

/*
//dsu
int arr[10001];
vector<int>size(10001,1);

int root(int x){
    while(x!=arr[x]){
        arr[x] = arr[arr[x]];
        x = arr[x];
    }
    return x;
}
void w_union(int x,int y){
    int rx = root(x),ry=root(y);
    if(rx!=ry){
        if(size[rx]<size[ry]){
            arr[rx] = ry;
            size[ry] += size[rx];
        }
        else {
            arr[ry] = rx;
            size[rx] += size[ry];
        }
    }
}
*/

int main(){
    NOS;
    int n;
    cin >> n;
    string s;
    cin >> s;
    sort(s.begin(),s.end());
    disp(s);
    return 0;
}

//priority_queue<int,vector<int>,greater<int> > mypq;
// vector<int>::iterator it,ls;
// ls = set_difference(a,a + n, b, b + n-1, v.begin());
// for (it = v.begin(); it < ls; ++it)
//         disp(*it);

//next_permutation(a,a+n)
//cout<< fixed << setprecision(2)<< variable << endl;


#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
//priority_queue<int,vector<int>,greater<int> > mypq;

struct compare{
    bool operator()(pair<char,int> p1,pair<char,int>p2){
        if(p1.second == p2.second)return (p1.first < p1.first);
        return (p1.second < p2.second);
    }
};
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    string s;
    cin >> s;

    unordered_map<int,int>cnt;
    unordered_map<int,int>::iterator iter;
    for(int i = 0;i<n;i++){
        cnt[s[i]]++;
    }
    priority_queue<pair<char,int>,vector<pair<char,int> >,compare > pq0;
    priority_queue<pair<char,int>,vector<pair<char,int> >,compare > pq1;

    for(iter=cnt.begin();iter!=cnt.end();++iter){
        if(iter->second%2 ==0){
            pq0.push({iter->first,iter->second});
        }
        else{
            pq1.push({iter->first,iter->second});
        }
    }
    string res = "";
    while(!pq0.empty() && !pq1.empty()){
            pair<char,int> p0 = pq0.top();
            pair<char,int> p1 = pq1.top();
            pq0.pop();
            pq1.pop();

            if(p0.second>p1.second){
                for(int i = 1;i<=p0.second+p1.second;i++){
                    if(i%2!=0){
                        res += p0.first;
                    }
                    else{
                        res += p1.first;
                    }
                }
            }
            else{
                for(int i = 1;i<=p0.second+p1.second;i++){
                    if(i%2==0){
                        res += p0.first;
                    }
                    else{
                        res += p1.first;
                    }
                }
            }
    }
    string res0 = "";
    while(!pq0.empty()){
        pair<char,int> p0 = pq0.top();
        pq0.pop();
        for(int i=0;i<p0.second;i++){
            if(i%2==0)res0 += p0.first;
            else res0 = p0.first + res0;
        }
    }
    string res1 = "";
    while(!pq1.empty()){
        pair<char,int> p1 = pq1.top();
        pq1.pop();
        if(pq1.empty()){
            for(int i=0;i<p1.second;i++){
                if(i%2==0)res1 += p1.first;
                else res1 = p1.first + res1;
            }
        }
        else{
            string res3 = "";
            pair<char,int> p2 = pq1.top();
            pq1.pop();
            for(int i=0;i<p1.second-1;i++){
                if(i%2==1)res3 += p1.first;
                else res3 = p1.first + res3;
            }

            for(int i=0;i<p2.second-1;i++){
                if(i%2==1)res3 += p2.first;
                else res3 = p2.first + res3;
            }
            res3 = res3 + p1.first + p2.first;
            res1 += res3;
        }

    }

    res = res + res0 + res1 ;
    cout << res << endl;

}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include <time.h>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<unordered_map>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define hash_mod 2305843009213717
#define mod7 1000000007
#define mod9 1000000009
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.141592653589793238
#define eps  1e-6

LL maxx(LL & a , LL & b){ return a>b ?  a : b ;}
LL minn(LL & a , LL & b){ return a>b ?  b : a ;}

using namespace std;
//int dx[] = {1 , -1 , 0 , 0} ;
//int dy[] = {0 , 0 , 1 , -1} ;
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
int int_gcd(int a, int b) {
    return b == 0 ? a : int_gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return a / gcd(a , b) * b;
}
LL poww(LL base, LL exp , LL mod){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int cnt[2000];
bool check(string s){

    for(int i = 0 ; i < (int)s.size() / 2 ; i++){
        if(s[i]  != s[(int)s.size() - i - 1]){
            return 0 ;
        }
    }

    return 1;
}
int cntss(string s){
    int cnts = 0 ;

    for(int i = 0 ; i < s.size() ; i++){
        string tmp = "" ;
        for(int j = i ; j < s.size() ; j++){
            tmp += s[j] ;
            cnts += check(tmp) ;
        }
    }

    return cnts ;
}
int gets(int x){

    for(int i = x ; i <= 'z' ; i++){
        if(cnt[i]){
            return i ;
        }
    }

    return 0 ;
}
int main()
{
    int n ; cin >> n ;
    string s;  cin >> s ;
    for(int i = 0 ; i < n ; i++){
        cnt[s[i]]++ ;
    }

    int cur = 0 , next = 0 ;
    string ans = "" ;
    for(int i = 0 ; i < n ; i += 2){
    	while((cnt[cur]==0 || cur==next) && cur <= 'z')
    		cur++;
    	while((cnt[next]==0 || next==cur) && next <= 'z')
    		next++;
        if(cnt[cur] <= cnt[next] && cnt[cur] != cnt[next] - 1){
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
        }
        else {
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
        }
    }
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include <time.h>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<unordered_map>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define hash_mod 2305843009213717
#define mod7 1000000007
#define mod9 1000000009
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.141592653589793238
#define eps  1e-6

LL maxx(LL & a , LL & b){ return a>b ?  a : b ;}
LL minn(LL & a , LL & b){ return a>b ?  b : a ;}

using namespace std;
//int dx[] = {1 , -1 , 0 , 0} ;
//int dy[] = {0 , 0 , 1 , -1} ;
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
int int_gcd(int a, int b) {
    return b == 0 ? a : int_gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return a / gcd(a , b) * b;
}
LL poww(LL base, LL exp , LL mod){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int cnt[2000];
int main()
{
    int n ; cin >> n ;
    string s;  cin >> s ;
    for(int i = 0 ; i < n ; i++){
        cnt[s[i]]++ ;
    }

    int cur = 0 , next = 0 ;
    string ans = "" ;
    for(int i = 0 ; i < n ; i += 2){
    	while((cnt[cur]==0 || cur==next) && cur <= 'z')
    		cur++;
    	while((cnt[next]==0 || next==cur) && next <= 'z')
    		next++;
        if(cnt[cur] >= cnt[next] && cnt[cur] != cnt[next] - 1){
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
        }
        else {
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
        }
    }
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include <time.h>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<unordered_map>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define hash_mod 2305843009213717
#define mod7 1000000007
#define mod9 1000000009
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.141592653589793238
#define eps  1e-6

LL maxx(LL & a , LL & b){ return a>b ?  a : b ;}
LL minn(LL & a , LL & b){ return a>b ?  b : a ;}

using namespace std;
//int dx[] = {1 , -1 , 0 , 0} ;
//int dy[] = {0 , 0 , 1 , -1} ;
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
int int_gcd(int a, int b) {
    return b == 0 ? a : int_gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return a / gcd(a , b) * b;
}
LL poww(LL base, LL exp , LL mod){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int cnt[2000];
int main()
{
    int n ; cin >> n ;
    string s;  cin >> s ;
    for(int i = 0 ; i < n ; i++){
        cnt[s[i]]++ ;
    }

    sort(all(s)) ;

    cout << s << endl ;
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include <time.h>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<unordered_map>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define hash_mod 2305843009213717
#define mod7 1000000007
#define mod9 1000000009
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.141592653589793238
#define eps  1e-6

LL maxx(LL & a , LL & b){ return a>b ?  a : b ;}
LL minn(LL & a , LL & b){ return a>b ?  b : a ;}

using namespace std;
//int dx[] = {1 , -1 , 0 , 0} ;
//int dy[] = {0 , 0 , 1 , -1} ;
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
int int_gcd(int a, int b) {
    return b == 0 ? a : int_gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return a / gcd(a , b) * b;
}
LL poww(LL base, LL exp , LL mod){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int cnt[2000];
bool check(string s){

    for(int i = 0 ; i < (int)s.size() / 2 ; i++){
        if(s[i]  != s[(int)s.size() - i - 1]){
            return 0 ;
        }
    }

    return 1;
}
int cntss(string s){
    int cnts = 0 ;

    for(int i = 0 ; i < s.size() ; i++){
        string tmp = "" ;
        for(int j = i ; j < s.size() ; j++){
            tmp += s[j] ;
            cnts += check(tmp) ;
        }
    }

    return cnts ;
}
int gets(int x){

    for(int i = x ; i <= 'z' ; i++){
        if(cnt[i]){
            return i ;
        }
    }

    return 0 ;
}
int main()
{
    int n ; cin >> n ;
    string s;  cin >> s ;
    cout << cntss(s) << endl ;
    for(int i = 0 ; i < n ; i++){
        cnt[s[i]]++ ;
    }

    int cur = 0 , next = 0 ;
    string ans = "" ;
    for(int i = 0 ; i < n ; i += 2){
    	while((cnt[cur]==0 || cur==next) && cur <= 'z')
    		cur++;
    	while((cnt[next]==0 || next==cur) && next <= 'z')
    		next++;
        if(cnt[cur] <= cnt[next] && cnt[cur] != cnt[next] - 1){
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
        }
        else {
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
        }
    }
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include <time.h>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<unordered_map>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define hash_mod 2305843009213717
#define mod7 1000000007
#define mod9 1000000009
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.141592653589793238
#define eps  1e-6

LL maxx(LL & a , LL & b){ return a>b ?  a : b ;}
LL minn(LL & a , LL & b){ return a>b ?  b : a ;}

using namespace std;
//int dx[] = {1 , -1 , 0 , 0} ;
//int dy[] = {0 , 0 , 1 , -1} ;
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
int int_gcd(int a, int b) {
    return b == 0 ? a : int_gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return a / gcd(a , b) * b;
}
LL poww(LL base, LL exp , LL mod){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int cnt[2000];
bool check(string s){

    for(int i = 0 ; i < (int)s.size() / 2 ; i++){
        if(s[i]  != s[(int)s.size() - i - 1]){
            return 0 ;
        }
    }

    return 1;
}
int cntss(string s){
    int cnts = 0 ;

    for(int i = 0 ; i < s.size() ; i++){
        string tmp = "" ;
        for(int j = i ; j < s.size() ; j++){
            tmp += s[j] ;
            cnts += check(tmp) ;
        }
    }

    return cnts ;
}
int gets(int x){

    for(int i = x ; i <= 'z' ; i++){
        if(cnt[i]){
            return i ;
        }
    }

    return 0 ;
}
int main()
{
    int n ; cin >> n ;
    string s;  cin >> s ;

    for(int i = 0 ; i < n ; i++){
        cnt[s[i]]++ ;
    }

    int cur = 0 , next = 0 ;

    for(int i = 0 ; i < n ; i += 2){
        cur = gets(cur) ;
        next = gets(cur + 1) ;
        if(cnt[cur] >= cnt[next]){
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
        }
        else {
            if(cnt[next]){
                cout << char(next) ;
                cnt[next]-- ;
            }
            if(cnt[cur]){
                cout << char(cur) ;
                cnt[cur]-- ;
            }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
int n;
char s[100000+10];
int main(){
    scanf("%d",&n);
    scanf("%s",s);
    sort(s,s+n);
    printf("%s\n",s);
}


#include <bits/stdc++.h>
using namespace std;

int n;
char s[100000+10];
int num[30];
int cnt0,cnt1;
int ouc[30];
int jic[30];

int main(){
	scanf("%d",&n);
	scanf("%s",s);
	for (int i=0;i<n;i++)	num[s[i]-'a']++;
	for (int i=0;i<26;i++){
		if (num[i]==0)	continue;
		if (num[i]%2==0)	ouc[cnt0++]=i;
		if (num[i]%2==1)	jic[cnt1++]=i;
	}
	int cnt=min(cnt0,cnt1);
	for (int i=0;i<cnt;i++){
		int ch1=ouc[i];
		int ch2=jic[i];
		int num1=num[ch1]; //ou    2
		int num2=num[ch2]; //ji    3
		if (num1>=num2+1){
			int k=num1-(num2+1);
			for (int j=0;j<k/2;j++)	printf("%c",ch1+'a');
			int tmp=num1;
			bool flag=1;
			while (tmp){
				if (flag){
					printf("%c",ch1+'a');
					flag^=1;
					tmp--;
				}
				else{
					printf("%c",ch2+'a');
					flag^=1;
				}
			}
			for (int j=0;j<k/2;j++)	printf("%c",ch1+'a');
		}
		else{
			int k=num2-(num1+1);
			for (int j=0;j<k/2;j++)	printf("%c",ch2+'a');
			int tmp=num2;
			bool flag=1;
			while (tmp){
				if (flag){
					printf("%c",ch2+'a');
					flag^=1;
					tmp--;
				}
				else{
					printf("%c",ch1+'a');
					flag^=1;
				}
			}
			for (int j=0;j<k/2;j++)	printf("%c",ch2+'a');
		}
	}
	if (cnt0>cnt1){
		for (int i=cnt;i<cnt0;i++){
			int ch=ouc[i];
			int num1=num[ch];
			for (int j=0;j<num1;j++)	printf("%c",ch+'a');
		}
	}
	else{
		for (int i=cnt;i<cnt1;i++){
			int ch=ouc[i];
			int num1=num[ch];
			for (int j=0;j<num1;j++)	printf("%c",ch+'a');
		}
	}
	putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

int n;
char s[100000+10];
int num[30];

int main(){
	scanf("%d",&n);
	scanf("%s",s);
	sort(s,s+n);
	printf("%s\n",s);
}


#include<bits/stdc++.h>
using namespace std;
#define pfi(a) printf("%d",a);
#define pfl(a) printf("%lld",a);
#define pfin(a) printf("%d\n",a);
#define pfln(a) printf("%lld\n",a);
#define sfi(a) scanf("%d",&a);
#define sfl(a) scanf("%lld",&a);
#define pb push_back
#define f(i,a,b) for(int i=a;i<b;i++)
#define ll long long

ll m=1e9+7;

int main(){
		string s;
		cin>>s;

		int arr[27]={0};

		f(i,0,s.length()){
			arr[s[i]-'a']++;
		}

		int ind=-1,maxi;
		vector<int> v;
		f(i,0,26){
			if(arr[i]%2 && ind==-1){
				maxi=arr[i];
				ind=i;
			}
			else if(arr[i]%2 && arr[i]>maxi){
				maxi=arr[i];
				ind=i;
			}

			if(arr[i]%2==0 && arr[i]!=0)
			{
				v.pb(i);
				//sum+=arr[i];
			}
		}

		char s1[s.length()+1];
		int cur=0;

		for(int i=0;i<v.size();++i){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1[cur++]=ch;
		}

		for(int i=0;i<maxi;++i){
			char ch='a'+ind;
			s1[cur++]=ch;
		}

		for(int i=v.size()-1;i>=0;i--){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1[cur++]=ch;
		}

		for(int i=0;i<26;i++){
			if(arr[i]%2 && ind!=i){
				char ch='a'+i;
				for(int j=0;j<arr[i];j++)
					s1[cur++]=ch;
			}
		}

		s1[s.length()]='\0';

		for(int i=0;s1[i]!='\0';i++)
			cout<<s1[i];

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pfi(a) printf("%d",a);
#define pfl(a) printf("%lld",a);
#define pfin(a) printf("%d\n",a);
#define pfln(a) printf("%lld\n",a);
#define sfi(a) scanf("%d",&a);
#define sfl(a) scanf("%lld",&a);
#define pb push_back
#define f(i,a,b) for(int i=a;i<b;i++)
#define ll long long

ll m=1e9+7;

int main(){
		int n;
		cin>>n;
		string s;
		cin>>s;

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

		cout<<s<<endl;

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pfi(a) printf("%d",a);
#define pfl(a) printf("%lld",a);
#define pfin(a) printf("%d\n",a);
#define pfln(a) printf("%lld\n",a);
#define sfi(a) scanf("%d",&a);
#define sfl(a) scanf("%lld",&a);
#define pb push_back
#define f(i,a,b) for(int i=a;i<b;i++)
#define ll long long

ll m=1e9+7;

int main(){
		string s;
		cin>>s;

		int arr[27]={0};

		f(i,0,s.length()){
			arr[s[i]-'a']++;
		}

		int ind=-1,maxi;
		vector<int> v;
		f(i,0,26){
			if(arr[i]%2 && ind==-1){
				maxi=arr[i];
				ind=i;
			}
			else if(arr[i]%2 && arr[i]>maxi){
				maxi=arr[i];
				ind=i;
			}

			if(arr[i]%2==0 && arr[i]!=0)
			{
				v.pb(i);
				//sum+=arr[i];
			}
		}

		string s1;

		for(int i=0;i<v.size();++i){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1.pb(ch);
		}

		for(int i=0;i<maxi;++i){
			char ch='a'+ind;
			s1.pb(ch);
		}

		for(int i=v.size()-1;i>=0;i--){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1.pb(ch);
		}

		for(int i=0;i<26;i++){
			if(arr[i]%2 && ind!=i){
				char ch='a'+i;
				for(int j=0;j<arr[i];j++)
					s1.pb(ch);
			}
		}

		cout<<s1;

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define pfi(a) printf("%d",a);
#define pfl(a) printf("%lld",a);
#define pfin(a) printf("%d\n",a);
#define pfln(a) printf("%lld\n",a);
#define sfi(a) scanf("%d",&a);
#define sfl(a) scanf("%lld",&a);
#define pb push_back
#define f(i,a,b) for(int i=a;i<b;i++)
#define ll long long

ll m=1e9+7;

int main(){
		int n;
		cin>>n;
		string s;
		cin>>s;

		int arr[27]={0};

		f(i,0,s.length()){
			arr[s[i]-'a']++;
		}

		int ind=-1,maxi;
		vector<int> v;
		f(i,0,26){
			if(arr[i]%2 && ind==-1){
				maxi=arr[i];
				ind=i;
			}
			else if(arr[i]%2 && arr[i]>maxi){
				maxi=arr[i];
				ind=i;
			}

			if(arr[i]%2==0 && arr[i]!=0)
			{
				v.pb(i);
				//sum+=arr[i];
			}
		}

		char s1[s.length()+1];
		int cur=0;

		for(int i=0;i<v.size();++i){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1[cur++]=ch;
		}

		for(int i=0;i<maxi;++i){
			char ch='a'+ind;
			s1[cur++]=ch;
		}

		for(int i=v.size()-1;i>=0;i--){
			char ch='a'+v[i];
			for(int j=0;j<arr[v[i]]/2;j++)
				s1[cur++]=ch;
		}

		for(int i=0;i<26;i++){
			if(arr[i]%2 && ind!=i){
				char ch='a'+i;
				for(int j=0;j<arr[i];j++)
					s1[cur++]=ch;
			}
		}

		s1[s.length()]='\0';

		for(int i=0;s1[i]!='\0';i++)
			cout<<s1[i];

	return 0;
}


//SkGeN
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstring>
#include<climits>
#include<deque>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> p64;
typedef vector<ll> v64;
const int N = 2 * 1e5 + 10;
const ll inf = 1e18 + 100;
const ll mod = 1e9 + 7;

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,s,e) for(long long i=s;i<=e;i++)
#define brep(i,s,e) for(long long i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define DANGER std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

void solve() {
	ll n ; cin>>n;
	string s;
	cin>>s;
	ll arr[26] = {0};
	for(int i = 0; i < n ; i++) {
		arr[s[i] - 'a']++;
	}

	string odd = "" , ans = "" , ws = "";

	for(int i = 0; i < 26 ; i++) {
		char ch = i + 'a';
		for(int j = 0; j < arr[i] ; j++) {
			cout<<ch;
		}
 	}

}
int main()
{
	DANGER;
	ll t = 1;
	//cin>>t;
	while(t--) {
		solve();
	}
return 0;
}
//---->O ,,


//SkGeN
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstring>
#include<climits>
#include<deque>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> p64;
typedef vector<ll> v64;
const int N = 2 * 1e5 + 10;
const ll inf = 1e18 + 100;
const ll mod = 1e9 + 7;

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,s,e) for(long long i=s;i<=e;i++)
#define brep(i,s,e) for(long long i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define DANGER std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

void solve() {
	ll n ; cin>>n;
	string s;
	cin>>s;
	ll arr[26] = {0};
	for(int i = 0; i < n ; i++) {
		arr[s[i] - 'a']++;
	}

	string odd = "" , ans = "";

	for(int i = 0; i < 26 ; i++) {
		char ch = i + 'a';
		if(arr[i]%2) {
			odd += ch;
		}
		for(int j = 0; j < arr[i]/2 ; j++) {
			ans += ch;
		}
 	}

	string rev = ans;
	rev = rev + odd;
	reverse(all(ans));
	rev = rev + ans;
	cout<<rev;
}
int main()
{
	DANGER;
	ll t = 1;
	//cin>>t;
	while(t--) {
		solve();
	}
return 0;
}
//---->O ,,


//SkGeN
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstring>
#include<climits>
#include<deque>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> p64;
typedef vector<ll> v64;
const int N = 2 * 1e5 + 10;
const ll inf = 1e18 + 100;
const ll mod = 1e9 + 7;

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,s,e) for(long long i=s;i<=e;i++)
#define brep(i,s,e) for(long long i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define DANGER std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

void solve() {
	ll n ; cin>>n;
	string s;
	cin>>s;
	ll arr[26] = {0};
	for(int i = 0; i < n ; i++) {
		arr[s[i] - 'a']++;
	}

	string odd = "" , ans = "";

	for(int i = 0; i < 26 ; i++) {
		char ch = i + 'a';
		if(arr[i]%2) {
			odd += ch;
		}
		for(int j = 0; j < arr[i]/2 ; j++) {
			ans += ch;
		}
 	}

	ans = ans + odd;
	string rev = ans;
	reverse(all(ans));
	rev = rev + ans;
	cout<<rev;
}
int main()
{
	DANGER;
	ll t = 1;
	//cin>>t;
	while(t--) {
		solve();
	}
return 0;
}
//---->O ,,


//SkGeN
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<cstring>
#include<climits>
#include<deque>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> p64;
typedef vector<ll> v64;
const int N = 2 * 1e5 + 10;
const ll inf = 1e18 + 100;
const ll mod = 1e9 + 7;

#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define rep(i,s,e) for(long long i=s;i<=e;i++)
#define brep(i,s,e) for(long long i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define DANGER std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

void solve() {
	ll n ; cin>>n;
	string s;
	cin>>s;
	ll arr[26] = {0};
	for(int i = 0; i < n ; i++) {
		arr[s[i] - 'a']++;
	}

	string odd = "" , ans = "" , ws = "";

	for(int i = 0; i < 26 ; i++) {
		char ch = i + 'a';
		if(arr[i]%2) {
			if(odd.size()) {
				ws += ch;
			} else {
				odd += ch;
			}
		}
		for(int j = 0; j < arr[i]/2 ; j++) {
			ans += ch;
		}
 	}

	string rev = ans;
	rev = rev + odd;
	reverse(all(ans));
	rev = rev + ans;
	cout<<rev + ws;
}
int main()
{
	DANGER;
	ll t = 1;
	//cin>>t;
	while(t--) {
		solve();
	}
return 0;
}
//---->O ,,


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int n;
    cin>>n;
    multiset<char> s;
    map<char,int> m;
    for (int i=0; i<n; i++)
    {
        char c;
        cin>>c;
        s.insert(c);
        m[c]++;
    }
    set<char> v;
    for (auto i : m)
    {
        if (i.second%2==0)
            continue;
        v.insert(i.first);
        s.erase(s.find(i.first));
    }
    deque<char> d;
    if (n%2==1)
    {
        d.push_back(*v.begin());
        v.erase(v.begin());
    }
    bool bol = false;
    for (auto i : s)
    {
        if (bol == false)
        {
            bol = true;
            d.push_back(i);
        }
        else
        {
            bol = false;
            d.push_front(i);
        }
    }
    for (auto i : v)
    {
        if (bol == false)
        {
            bol = true;
            d.push_back(i);
        }
        else
        {
            bol = false;
            d.push_front(i);
        }
    }
    for (int i=0; i<d.size(); i++)
        cout<<d[i];
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int n;
    cin>>n;
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    cout<<s;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int n;
    cin>>n;
    multiset<char> s;
    map<char,int> m;
    for (int i=0; i<n; i++)
    {
        char c;
        cin>>c;
        s.insert(c);
        m[c]++;
    }
    set<char> v;
    for (auto i : m)
    {
        if (i.second%2==0)
            continue;
        v.insert(i.first);
        s.erase(s.find(i.first));
    }
    deque<char> d;
    if (n%2==1)
    {
        d.push_back(*v.begin());
        v.erase(v.begin());
    }
    bool bol = false;
    for (auto i : s)
    {
        if (bol == false)
        {
            bol = true;
            d.push_back(i);
        }
        else
        {
            bol = false;
            d.push_front(i);
        }
    }
    for (auto i : v)
        d.push_back(i);
    for (int i=0; i<d.size(); i++)
        cout<<d[i];
    return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;
int main()
{
  long int n;
  cin>>n;
  string a;
  cin>>a;
  int arr[26+1]={0};
  vector<pair<int,char> > v;
  while(n>0)
  {
    arr[int(a[n-1])-96]++;
    n--;
  }
  for(int i=1;i<=26;i++)
    if(arr[i]!=0)
      v.push_back(make_pair(arr[i],char(i+96)));
  sort(v.rbegin(),v.rend());

  for(int i=0;i<v.size();i++)
  {
    while(v[i].first!=0)
    {
      cout<<v[i].second;
      v[i].first--;
    }
  }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;
int main()
{
  long int n;
  cin>>n;
  string a;
  cin>>a;
  int arr[26+1]={0};
  vector<pair<int,char> > v;
  while(n>0)
  {
    arr[a[n-1]-'`']++;
    n--;
  }
  for(int i=1;i<26;i++)
    if(arr[i])
      v.push_back(make_pair(arr[i],char(i+'`')));
  sort(v.rbegin(),v.rend());

  for(int i=0;i<v.size();i+=2)
  {
    while(v[i].first!=0 )
    {
      cout<<v[i].second;
      if(v[i+1].first && i<v.size()-1)
        cout<<v[i+1].second;
      v[i].first--; v[i+1].first--;
    }
  }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;
int main()
{
  long int n;
  cin>>n;
  string a;
  cin>>a;
  int arr[26+1]={0};
  vector<pair<int,char> > v;
  while(n>0)
  {
    arr[int(a[n-1])-96]++;
    n--;
  }
  for(int i=1;i<=26;i++)
    if(arr[i]!=0)
      v.push_back(make_pair(arr[i],char(i+96)));
  sort(v.rbegin(),v.rend());

  for(int i=0;i<v.size();i+=2)
  {
    while(v[i].first!=0 )
    {
      cout<<v[i].second;
      if(v[i+1].first>0 && i<v.size()-1)
        cout<<v[i+1].second;
      v[i].first--; v[i+1].first--;
    }
  }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;
int main()
{
  long int n;
  cin>>n;
  string a;
  cin>>a;
  int arr[26+1]={0};
  vector<pair<int,char> > v;
  while(n>0)
  {
    arr[int(a[n-1])-96]++;
    n--;
  }
  for(int i=1;i<=26;i++)
    if(arr[i]!=0)
      v.push_back(make_pair(arr[i],char(i+96)));
  sort(v.rbegin(),v.rend());

  for(int i=0;i<v.size();i+=2)
  {
    while(v[i].first!=0 )
    {
      cout<<v[i].second;
      if(v[i+1].first!=0 && i<v.size()-1)
        cout<<v[i+1].second;
      v[i].first--; v[i+1].first--;
    }
  }

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <set>
#include <bitset>
#include <map>
#include<fstream>
int w = 0;
#define  ONGU freopen("groups.in", "r", stdin);
#define  el "\n"
#define  allv(v)      (v).begin(),(v).end()
#define  allvb(v)      (v).rbegin(),(v).rend()
#define  EPS    1e-10
#define  memset       (memo, -1, sizeof memo)
#define  rep(i,x) for(int(i)=0;(i)<(ll)(x);(i)++)
int const oo = (int)10e6;
typedef  long long ll;
using namespace std;
char vowels[] = { 'a', 'o', 'e', 'u', 'i' };
int A[2 * 100000];
ll n, m;
bool cycle = false;
bitset <64> bt;
set <int> st;
vector<bool>comp;
vector<bool>vis;
vector<bool>vis2;
vector<vector<int>>v;
map<int, int>mp;
map<char, int>mp2;
priority_queue<long long, vector<long long>, greater<long long> >pq;
bool viss[100][100] = { 0 };
int l1, l2;
int saved[100][100];
ll savedans[100000] = { 1 };
vector<pair<ll, ll>>v2;
vector<pair<int, int>>vv;
vector<ll>vc;
vector<ll>va;
char gr[1000][1000];
bool even(ll x)
{
	return ((n & 1) == 0) ? 1 : 0;
}
ll   gcd(ll a, ll b)
{
	return b == 0 ? a : gcd(b, a%b);
}
ll   lcm(ll n, ll m)
{
	return (n*m) / gcd(n, m);
}

string toBinary(int n)
{
	string r;
	while (n != 0) { r = (n % 2 == 0 ? "0" : "1") + r; n /= 2; }
	return r;
}
bool prime(ll n)
{
	if (n == 0 || n == 1)
		return 1;
	for (ll i = 2; i*i <= n; i++)
	if (n%i == 0)
		return 0;
	return 1;
}
bool isvowels(char a)
{
	for (int i = 0; i < 5; i++)
	if (a == vowels[i])
		return true;
	return false;
}
ll binary_search(ll x, ll y)
{
	int l = 0, r = y, mid;
	while (l <= r)
	{
		mid = l + (r - l) / 2;
		if (mid*(mid + 1) == x)
			break;
		else if (mid*(mid + 1) >= x)
			r = mid - 1;
		else
			l = mid + 1;

	}
	if (mid*(mid + 1) == x)
		return mid;
	else
		return -1;
}
bool bal(string z)
{
	string x = z;
	reverse(x.begin(), x.end());
	if (z == x)
		return true;
	else
		return false;
}
void fast(){
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
}

bool F(int i, ll sum)
{
	if (i == n)
		return sum%m == 0;
	if (savedans[i] != -1)
		return savedans[i];
	if (F(i + 1, sum + vc[i]) || F(i + 1, sum - vc[i]))
		return 1;
	return 0;

}
int FEB(int n)
{
	if (n <= 1)
		return 1;
	if (savedans[n] != -1)
		return savedans[n];
	return savedans[n] = FEB(n - 1) + FEB(n - 2);

}
int arr1[100005] = { -1 }, arr2[100005] = { -1 };
ll minn;
void Dfs(int u, int p, int c)
{
	if (vis[u])
		return;
	vis[u] = 1;

	for (int i = 0; i < v[u].size(); i++)
	{
		if (!vis[v[u][i]])
			Dfs(v[u][i], u, c);
	}
	return;
}

int find(int u)
{
	if (A[u] == u)
		return u;
	else
		return A[u] = find(A[u]);
}
bool valied(int x, int y)
{
	if (x >= n || y >= m || x < 0 || y < 0)
		return 0;

	return 1;
}

int maxxx(int x, int y)
{
	if (!valied)
		return 0;
	if (saved[x][y] != -1)
		return saved[x][y];
}
string ok = "YES", no = "NO";
map<pair<int, int>, int>mpp;

int bi_s(int x, int f)
{

	int l = 0, r = n - 1, mid;
	if (f != -1)
		l = f + 1;
	while (l <= r)
	{
		mid = l + (r - l) / 2;

		if (f != -1)
		{
			if (vc[mid] - vc[f] > x)
				r = mid - 1;
			else if (vc[mid] - vc[f] < x)
				l = mid + 1;
			else
				break;
		}
		else
		{

			if (vc[mid]  > x)
				r = mid - 1;
			else if (vc[mid]  < x)
				l = mid + 1;
			else
				break;
		}
	}

	return mid;
}
bool anns = false; vector<ll>cost;
ll miiiin = INT_MAX;
void CDfs(int u, int p, int nw)
{

	if (vis2[u])
		return;
	miiiin = min(miiiin, cost[u]);
	vis2[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	if (v[u][i] != p)
		CDfs(v[u][i], u, nw);
}
bool fff = false;
void fs(int u, int p)
{
	if (vis[u]){
		cycle = true;
		return;
	}
	vis[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	{
		if (comp[v[u][i]])
			fff = true;
		if (!vis[v[u][i]])
			fs(v[u][i], u);
	}
	comp[u] = true;
}

ll b_search(ll x, ll maa)
{
	ll l = 1, r = x, mid, ans = 0;
	while (l <= r)
	{
		mid = l + (r - l) / 2; ll mm = maa;
		ll sum = 0; ll c = 0;
		for (int i = 0; i < n; i++)
		{
			ll md = (v2[i].first*mid);
			if (md <= v2[i].second)
				c++;
			else
			{
				ll s = v2[i].first*mid - v2[i].second;
				if (sum + s <= mm &&s >= 0)
					c++, sum += s;
				else break;
			}
		}
		if (c< n){
			r = mid - 1;
		}
		else if (c >= n){
			l = mid + 1;
			if (c == n)
				ans = max(mid, ans);
		}
	}
	return ans;
}

int main()
{
	string x; cin >> x;
	vector<char>ch(x.size());
	rep(i, x.size())
		vc[i] = x[i];
	sort(allv(ch));
	rep(i, ch.size())
		cout << ch[i];
 //   system("pause");
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <set>
#include <bitset>
#include <map>
#include<fstream>
int w = 0;
#define  ONGU freopen("groups.in", "r", stdin);
#define  el "\n"
#define  allv(v)      (v).begin(),(v).end()
#define  allvb(v)      (v).rbegin(),(v).rend()
#define  EPS    1e-10
#define  memset       (memo, -1, sizeof memo)
#define  rep(i,x) for(int(i)=0;(i)<(ll)(x);(i)++)
int const oo = (int)10e6;
typedef  long long ll;
using namespace std;
char vowels[] = { 'a', 'o', 'e', 'u', 'i' };
int A[2 * 100000];
ll n, m;
bool cycle = false;
bitset <64> bt;
set <int> st;
vector<bool>comp;
vector<bool>vis;
vector<bool>vis2;
vector<vector<int>>v;
map<int, int>mp;
map<char, int>mp2;
priority_queue<long long, vector<long long>, greater<long long> >pq;
bool viss[100][100] = { 0 };
int l1, l2;
int saved[100][100];
ll savedans[100000] = { 1 };
vector<pair<ll, ll>>v2;
vector<pair<int, int>>vv;
vector<ll>vc;
vector<ll>va;
char gr[1000][1000];
bool even(ll x)
{
	return ((n & 1) == 0) ? 1 : 0;
}
ll   gcd(ll a, ll b)
{
	return b == 0 ? a : gcd(b, a%b);
}
ll   lcm(ll n, ll m)
{
	return (n*m) / gcd(n, m);
}

string toBinary(int n)
{
	string r;
	while (n != 0) { r = (n % 2 == 0 ? "0" : "1") + r; n /= 2; }
	return r;
}
bool prime(ll n)
{
	if (n == 0 || n == 1)
		return 1;
	for (ll i = 2; i*i <= n; i++)
	if (n%i == 0)
		return 0;
	return 1;
}
bool isvowels(char a)
{
	for (int i = 0; i < 5; i++)
	if (a == vowels[i])
		return true;
	return false;
}
ll binary_search(ll x, ll y)
{
	int l = 0, r = y, mid;
	while (l <= r)
	{
		mid = l + (r - l) / 2;
		if (mid*(mid + 1) == x)
			break;
		else if (mid*(mid + 1) >= x)
			r = mid - 1;
		else
			l = mid + 1;

	}
	if (mid*(mid + 1) == x)
		return mid;
	else
		return -1;
}
bool bal(string z)
{
	string x = z;
	reverse(x.begin(), x.end());
	if (z == x)
		return true;
	else
		return false;
}
void fast(){
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
}

bool F(int i, ll sum)
{
	if (i == n)
		return sum%m == 0;
	if (savedans[i] != -1)
		return savedans[i];
	if (F(i + 1, sum + vc[i]) || F(i + 1, sum - vc[i]))
		return 1;
	return 0;

}
int FEB(int n)
{
	if (n <= 1)
		return 1;
	if (savedans[n] != -1)
		return savedans[n];
	return savedans[n] = FEB(n - 1) + FEB(n - 2);

}
int arr1[100005] = { -1 }, arr2[100005] = { -1 };
ll minn;
void Dfs(int u, int p, int c)
{
	if (vis[u])
		return;
	vis[u] = 1;

	for (int i = 0; i < v[u].size(); i++)
	{
		if (!vis[v[u][i]])
			Dfs(v[u][i], u, c);
	}
	return;
}

int find(int u)
{
	if (A[u] == u)
		return u;
	else
		return A[u] = find(A[u]);
}
bool valied(int x, int y)
{
	if (x >= n || y >= m || x < 0 || y < 0)
		return 0;

	return 1;
}

int maxxx(int x, int y)
{
	if (!valied)
		return 0;
	if (saved[x][y] != -1)
		return saved[x][y];
}
string ok = "YES", no = "NO";
map<pair<int, int>, int>mpp;

int bi_s(int x, int f)
{

	int l = 0, r = n - 1, mid;
	if (f != -1)
		l = f + 1;
	while (l <= r)
	{
		mid = l + (r - l) / 2;

		if (f != -1)
		{
			if (vc[mid] - vc[f] > x)
				r = mid - 1;
			else if (vc[mid] - vc[f] < x)
				l = mid + 1;
			else
				break;
		}
		else
		{

			if (vc[mid]  > x)
				r = mid - 1;
			else if (vc[mid]  < x)
				l = mid + 1;
			else
				break;
		}
	}

	return mid;
}
bool anns = false; vector<ll>cost;
ll miiiin = INT_MAX;
void CDfs(int u, int p, int nw)
{

	if (vis2[u])
		return;
	miiiin = min(miiiin, cost[u]);
	vis2[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	if (v[u][i] != p)
		CDfs(v[u][i], u, nw);
}
bool fff = false;
void fs(int u, int p)
{
	if (vis[u]){
		cycle = true;
		return;
	}
	vis[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	{
		if (comp[v[u][i]])
			fff = true;
		if (!vis[v[u][i]])
			fs(v[u][i], u);
	}
	comp[u] = true;
}

ll b_search(ll x, ll maa)
{
	ll l = 1, r = x, mid, ans = 0;
	while (l <= r)
	{
		mid = l + (r - l) / 2; ll mm = maa;
		ll sum = 0; ll c = 0;
		for (int i = 0; i < n; i++)
		{
			ll md = (v2[i].first*mid);
			if (md <= v2[i].second)
				c++;
			else
			{
				ll s = v2[i].first*mid - v2[i].second;
				if (sum + s <= mm &&s >= 0)
					c++, sum += s;
				else break;
			}
		}
		if (c< n){
			r = mid - 1;
		}
		else if (c >= n){
			l = mid + 1;
			if (c == n)
				ans = max(mid, ans);
		}
	}
	return ans;
}

int main()
{
	string x; cin >> x;
	vector<char>ch(x.size());
	rep(i, x.size())
		ch[i] = x[i];
	sort(allv(ch));
	rep(i, ch.size())
		cout << ch[i];
 //   system("pause");
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <set>
#include <bitset>
#include <map>
#include<fstream>
int w = 0;
#define  ONGU freopen("groups.in", "r", stdin);
#define  el "\n"
#define  allv(v)      (v).begin(),(v).end()
#define  allvb(v)      (v).rbegin(),(v).rend()
#define  EPS    1e-10
#define  memset       (memo, -1, sizeof memo)
#define  rep(i,x) for(int(i)=0;(i)<(ll)(x);(i)++)
int const oo = (int)10e6;
typedef  long long ll;
using namespace std;
char vowels[] = { 'a', 'o', 'e', 'u', 'i' };
int A[2 * 100000];
ll n, m;
bool cycle = false;
bitset <64> bt;
set <int> st;
vector<bool>comp;
vector<bool>vis;
vector<bool>vis2;
vector<vector<int>>v;
map<int, int>mp;
map<char, int>mp2;
priority_queue<long long, vector<long long>, greater<long long> >pq;
bool viss[100][100] = { 0 };
int l1, l2;
int saved[100][100];
ll savedans[100000] = { 1 };
vector<pair<ll, ll>>v2;
vector<pair<int, int>>vv;
vector<ll>vc;
vector<ll>va;
char gr[1000][1000];
bool even(ll x)
{
	return ((n & 1) == 0) ? 1 : 0;
}
ll   gcd(ll a, ll b)
{
	return b == 0 ? a : gcd(b, a%b);
}
ll   lcm(ll n, ll m)
{
	return (n*m) / gcd(n, m);
}

string toBinary(int n)
{
	string r;
	while (n != 0) { r = (n % 2 == 0 ? "0" : "1") + r; n /= 2; }
	return r;
}
bool prime(ll n)
{
	if (n == 0 || n == 1)
		return 1;
	for (ll i = 2; i*i <= n; i++)
	if (n%i == 0)
		return 0;
	return 1;
}
bool isvowels(char a)
{
	for (int i = 0; i < 5; i++)
	if (a == vowels[i])
		return true;
	return false;
}
ll binary_search(ll x, ll y)
{
	int l = 0, r = y, mid;
	while (l <= r)
	{
		mid = l + (r - l) / 2;
		if (mid*(mid + 1) == x)
			break;
		else if (mid*(mid + 1) >= x)
			r = mid - 1;
		else
			l = mid + 1;

	}
	if (mid*(mid + 1) == x)
		return mid;
	else
		return -1;
}
bool bal(string z)
{
	string x = z;
	reverse(x.begin(), x.end());
	if (z == x)
		return true;
	else
		return false;
}
void fast(){
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
}

bool F(int i, ll sum)
{
	if (i == n)
		return sum%m == 0;
	if (savedans[i] != -1)
		return savedans[i];
	if (F(i + 1, sum + vc[i]) || F(i + 1, sum - vc[i]))
		return 1;
	return 0;

}
int FEB(int n)
{
	if (n <= 1)
		return 1;
	if (savedans[n] != -1)
		return savedans[n];
	return savedans[n] = FEB(n - 1) + FEB(n - 2);

}
int arr1[100005] = { -1 }, arr2[100005] = { -1 };
ll minn;
void Dfs(int u, int p, int c)
{
	if (vis[u])
		return;
	vis[u] = 1;

	for (int i = 0; i < v[u].size(); i++)
	{
		if (!vis[v[u][i]])
			Dfs(v[u][i], u, c);
	}
	return;
}

int find(int u)
{
	if (A[u] == u)
		return u;
	else
		return A[u] = find(A[u]);
}
bool valied(int x, int y)
{
	if (x >= n || y >= m || x < 0 || y < 0)
		return 0;

	return 1;
}

int maxxx(int x, int y)
{
	if (!valied)
		return 0;
	if (saved[x][y] != -1)
		return saved[x][y];
}
string ok = "YES", no = "NO";
map<pair<int, int>, int>mpp;

int bi_s(int x, int f)
{

	int l = 0, r = n - 1, mid;
	if (f != -1)
		l = f + 1;
	while (l <= r)
	{
		mid = l + (r - l) / 2;

		if (f != -1)
		{
			if (vc[mid] - vc[f] > x)
				r = mid - 1;
			else if (vc[mid] - vc[f] < x)
				l = mid + 1;
			else
				break;
		}
		else
		{

			if (vc[mid]  > x)
				r = mid - 1;
			else if (vc[mid]  < x)
				l = mid + 1;
			else
				break;
		}
	}

	return mid;
}
bool anns = false; vector<ll>cost;
ll miiiin = INT_MAX;
void CDfs(int u, int p, int nw)
{

	if (vis2[u])
		return;
	miiiin = min(miiiin, cost[u]);
	vis2[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	if (v[u][i] != p)
		CDfs(v[u][i], u, nw);
}
bool fff = false;
void fs(int u, int p)
{
	if (vis[u]){
		cycle = true;
		return;
	}
	vis[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	{
		if (comp[v[u][i]])
			fff = true;
		if (!vis[v[u][i]])
			fs(v[u][i], u);
	}
	comp[u] = true;
}

ll b_search(ll x, ll maa)
{
	ll l = 1, r = x, mid, ans = 0;
	while (l <= r)
	{
		mid = l + (r - l) / 2; ll mm = maa;
		ll sum = 0; ll c = 0;
		for (int i = 0; i < n; i++)
		{
			ll md = (v2[i].first*mid);
			if (md <= v2[i].second)
				c++;
			else
			{
				ll s = v2[i].first*mid - v2[i].second;
				if (sum + s <= mm &&s >= 0)
					c++, sum += s;
				else break;
			}
		}
		if (c< n){
			r = mid - 1;
		}
		else if (c >= n){
			l = mid + 1;
			if (c == n)
				ans = max(mid, ans);
		}
	}
	return ans;
}

int main()
{
	string x; cin >> x;
	sort(x.begin(),x.end());
	cout << x;
//	system("pause");
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <set>
#include <bitset>
#include <map>
#include<fstream>
int w = 0;
#define  ONGU freopen("groups.in", "r", stdin);
#define  el "\n"
#define  allv(v)      (v).begin(),(v).end()
#define  allvb(v)      (v).rbegin(),(v).rend()
#define  EPS    1e-10
#define  memset       (memo, -1, sizeof memo)
#define  rep(i,x) for(int(i)=0;(i)<(ll)(x);(i)++)
int const oo = (int)10e6;
typedef  long long ll;
using namespace std;
char vowels[] = { 'a', 'o', 'e', 'u', 'i' };
int A[2 * 100000];
ll n, m;
bool cycle = false;
bitset <64> bt;
set <int> st;
vector<bool>comp;
vector<bool>vis;
vector<bool>vis2;
vector<vector<int>>v;
map<int, int>mp;
map<char, int>mp2;
priority_queue<long long, vector<long long>, greater<long long> >pq;
bool viss[100][100] = { 0 };
int l1, l2;
int saved[100][100];
ll savedans[100000] = { 1 };
vector<pair<ll, ll>>v2;
vector<pair<int, int>>vv;
vector<ll>vc;
vector<ll>va;
char gr[1000][1000];
bool even(ll x)
{
	return ((n & 1) == 0) ? 1 : 0;
}
ll   gcd(ll a, ll b)
{
	return b == 0 ? a : gcd(b, a%b);
}
ll   lcm(ll n, ll m)
{
	return (n*m) / gcd(n, m);
}

string toBinary(int n)
{
	string r;
	while (n != 0) { r = (n % 2 == 0 ? "0" : "1") + r; n /= 2; }
	return r;
}
bool prime(ll n)
{
	if (n == 0 || n == 1)
		return 1;
	for (ll i = 2; i*i <= n; i++)
	if (n%i == 0)
		return 0;
	return 1;
}
bool isvowels(char a)
{
	for (int i = 0; i < 5; i++)
	if (a == vowels[i])
		return true;
	return false;
}
ll binary_search(ll x, ll y)
{
	int l = 0, r = y, mid;
	while (l <= r)
	{
		mid = l + (r - l) / 2;
		if (mid*(mid + 1) == x)
			break;
		else if (mid*(mid + 1) >= x)
			r = mid - 1;
		else
			l = mid + 1;

	}
	if (mid*(mid + 1) == x)
		return mid;
	else
		return -1;
}
bool bal(string z)
{
	string x = z;
	reverse(x.begin(), x.end());
	if (z == x)
		return true;
	else
		return false;
}
void fast(){
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL);
}

bool F(int i, ll sum)
{
	if (i == n)
		return sum%m == 0;
	if (savedans[i] != -1)
		return savedans[i];
	if (F(i + 1, sum + vc[i]) || F(i + 1, sum - vc[i]))
		return 1;
	return 0;

}
int FEB(int n)
{
	if (n <= 1)
		return 1;
	if (savedans[n] != -1)
		return savedans[n];
	return savedans[n] = FEB(n - 1) + FEB(n - 2);

}
int arr1[100005] = { -1 }, arr2[100005] = { -1 };
ll minn;
void Dfs(int u, int p, int c)
{
	if (vis[u])
		return;
	vis[u] = 1;

	for (int i = 0; i < v[u].size(); i++)
	{
		if (!vis[v[u][i]])
			Dfs(v[u][i], u, c);
	}
	return;
}

int find(int u)
{
	if (A[u] == u)
		return u;
	else
		return A[u] = find(A[u]);
}
bool valied(int x, int y)
{
	if (x >= n || y >= m || x < 0 || y < 0)
		return 0;

	return 1;
}

int maxxx(int x, int y)
{
	if (!valied)
		return 0;
	if (saved[x][y] != -1)
		return saved[x][y];
}
string ok = "YES", no = "NO";
map<pair<int, int>, int>mpp;

int bi_s(int x, int f)
{

	int l = 0, r = n - 1, mid;
	if (f != -1)
		l = f + 1;
	while (l <= r)
	{
		mid = l + (r - l) / 2;

		if (f != -1)
		{
			if (vc[mid] - vc[f] > x)
				r = mid - 1;
			else if (vc[mid] - vc[f] < x)
				l = mid + 1;
			else
				break;
		}
		else
		{

			if (vc[mid]  > x)
				r = mid - 1;
			else if (vc[mid]  < x)
				l = mid + 1;
			else
				break;
		}
	}

	return mid;
}
bool anns = false; vector<ll>cost;
ll miiiin = INT_MAX;
void CDfs(int u, int p, int nw)
{

	if (vis2[u])
		return;
	miiiin = min(miiiin, cost[u]);
	vis2[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	if (v[u][i] != p)
		CDfs(v[u][i], u, nw);
}
bool fff = false;
void fs(int u, int p)
{
	if (vis[u]){
		cycle = true;
		return;
	}
	vis[u] = 1;
	for (int i = 0; i < v[u].size(); i++)
	{
		if (comp[v[u][i]])
			fff = true;
		if (!vis[v[u][i]])
			fs(v[u][i], u);
	}
	comp[u] = true;
}

ll b_search(ll x, ll maa)
{
	ll l = 1, r = x, mid, ans = 0;
	while (l <= r)
	{
		mid = l + (r - l) / 2; ll mm = maa;
		ll sum = 0; ll c = 0;
		for (int i = 0; i < n; i++)
		{
			ll md = (v2[i].first*mid);
			if (md <= v2[i].second)
				c++;
			else
			{
				ll s = v2[i].first*mid - v2[i].second;
				if (sum + s <= mm &&s >= 0)
					c++, sum += s;
				else break;
			}
		}
		if (c< n){
			r = mid - 1;
		}
		else if (c >= n){
			l = mid + 1;
			if (c == n)
				ans = max(mid, ans);
		}
	}
	return ans;
}

int main()
{
	cin >> n;
	string x; cin >> x;
	sort(x.begin(),x.end());
	cout << x;
//	system("pause");
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<functional>
typedef long long ll;
const int MAXN = 2e5 + 5;
using namespace std;

int n, cnt[33];
char s[MAXN], ch, results[MAXN << 1];
int main() {
	scanf("%d", &n);
	bool flag = false;
	getchar();
	for (int i = 1; i <= n; i++) {
		scanf("%c", &ch);
		cnt[ch - 'a']++;
	}
	int index1 = MAXN - 4, index2 = MAXN - 4;
	for (int i = 'a' - 'a'; i <= 'z' - 'a' && !flag; i++) {
		if (cnt[i] & 1) {
			flag = true;
			results[index1] = i + 'a';
			index1--;
			index2++;
			cnt[i]--;
		}
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		if (!(cnt[i] & 1) && cnt[i] > 0) {
			for (int j = 1; j <= cnt[i] / 2; j++) {
				results[index1] = results[index2] = i + 'a';
				index1--;
				index2++;
			}
			cnt[i] = 0;
		}
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		for (int j = 1; j <= cnt[i] / 2; j++) {
			results[index1] = i + 'a';
			index1--;
			cnt[i] --;
		}
	}
	for (int i = index1 + 1; i <= index2 - 1; i++) {
		printf("%c", results[i]);
	}
	printf("\n");
	return 0;
}


#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>

const int INF = 0x3f3f3f3f;
const int MAXN = 1e5 +5;
typedef long long ll;
using namespace std;

int n;
char str[MAXN];
int main(){
	scanf("%d",&n);
	scanf("%s",str+1);
	sort(str+1,str+n+1);
	printf("%s\n",str);
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<functional>
typedef long long ll;
const int MAXN = 2e5 + 5;
using namespace std;

int n, cnt[33];
char s[MAXN], ch, results[MAXN << 1];
int main() {
	scanf("%d", &n);
	bool flag = false;
	getchar();
	for (int i = 1; i <= n; i++) {
		scanf("%c", &ch);
		cnt[ch - 'a']++;
	}
	int index1 = MAXN - 4, index2 = MAXN - 4;
	for (int i = 'a' - 'a'; i <= 'z' - 'a' && !flag; i++) {
		if (cnt[i] & 1) {
			flag = true;
			results[index1] = i + 'a';
			cnt[i]--;
		}
	}
	index1--;
	index2++;
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		if (!(cnt[i] & 1) && cnt[i] > 0) {
			for (int j = 1; j <= cnt[i] / 2; j++) {
				results[index1] = results[index2] = i + 'a';
				index1--;
				index2++;
			}
			cnt[i] = 0;
		}
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		for (int j = 1; j <= cnt[i]; j++) {
			results[index1] = i + 'a';
			index1--;
		}
	}
	for (int i = index1 + 1; i <= index2; i++) {
		if (i == MAXN - 4 && !flag) {
			continue;
		}
		printf("%c", results[i]);
	}
	printf("\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<functional>
typedef long long ll;
const int MAXN = 2e5 + 5;
using namespace std;

int n, cnt[33];
char s[MAXN], ch, results[MAXN << 1];
int main() {
	scanf("%d", &n);
	bool flag = false;
	getchar();
	for (int i = 1; i <= n; i++) {
		scanf("%c", &ch);
		cnt[ch - 'a']++;
	}
	int index1 = MAXN - 4, index2 = MAXN - 4;
	for (int i = 'a' - 'a'; i <= 'z' - 'a' && !flag; i++) {
		if (cnt[i] & 1) {
			flag = true;
			results[index1] = i + 'a';
			cnt[i]--;
		}
	}
	index1--;
	index2++;
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		if (!(cnt[i] & 1) && cnt[i] > 0) {
			for (int j = 1; j <= cnt[i] / 2; j++) {
				results[index1] = results[index2] = i + 'a';
				index1--;
				index2++;
			}
			cnt[i] = 0;
		}
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		for (int j = 1; j <= cnt[i]; j++) {
			results[index1] = i + 'a';
			index1--;
		}
	}
	for (int i = index1 + 1; i <= index2 - 1; i++) {
		if (i == MAXN - 4 && !flag) {
			continue;
		}
		printf("%c", results[i]);
	}
	printf("\n");
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<functional>
typedef long long ll;
const int MAXN = 2e5 + 5;
using namespace std;

int n, cnt[33];
char s[MAXN], ch, results[MAXN << 1];
int main() {
	scanf("%d", &n);
	bool flag = false, flag2 = false;
	getchar();
	for (int i = 1; i <= n; i++) {
		scanf("%c", &ch);
		cnt[ch - 'a']++;
	}
	int index1 = MAXN - 4, index2 = MAXN - 4;
	for (int i = 'a' - 'a'; i <= 'z' - 'a' && !flag; i++) {
		if (cnt[i] & 1 && cnt[i] >= 3) {
			flag = true;
			results[index1] = i + 'a';
			cnt[i]--;
			index1--;
			index2++;
			for (int j = 1; j <= cnt[i] / 2; j++) {
				results[index1] = results[index2] = i + 'a';
				index1--;
				index2++;
			}
			cnt[i] = 0;
		}
	}
	for (int i = 'a' - 'a'; i <= 'z' - 'a' && !flag; i++) {
		if (cnt[i] & 1) {
			flag2 = true;
			results[index1] = i + 'a';
			cnt[i]--;
			break;
		}
	}
	if (!flag) {
		index1--;
		index2++;
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		if (cnt[i] > 1) {
			for (int j = 1; j <= cnt[i] / 2; j++) {
				results[index1] = results[index2] = i + 'a';
				index1--;
				index2++;
			}
			cnt[i] -= cnt[i] / 2 * 2;
		}
	}
	for (int i = 'a' - 97; i <= 'z' - 97; i++) {
		for (int j = 1; j <= cnt[i]; j++) {
			results[index1] = i + 'a';
			index1--;
		}
	}
	for (int i = index1 + 1; i <= index2 - 1; i++) {
		if (i == MAXN - 4 && !flag && !flag2) {
			continue;
		}
		printf("%c", results[i]);
	}
	printf("\n");
	return 0;
}


#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>

const int INF = 0x3f3f3f3f;
const int MAXN = 1e5 +5;
typedef long long ll;
using namespace std;

int n;
char str[MAXN];
int main(){
	scanf("%d",&n);
	scanf("%s",str+1);
	sort(str+1,str+n+1);
	printf("%s\n",str+1);
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ull unsigned long long
#define pi pair<ll,ll>
#define vi vector<ll>
#define sc second
#define ft first
#define p_q priority_queue
#define INF 10000000000
using namespace std;
const ll MOD=1e9+7;
const ll N=2e5+7;
ll n,j,ans=0,a[N];
string s;
/*ll dp(int i,int j){
    if( i==n || j==m || a[i][j]=='#') return 0;
    ll &ret=mem[i][j];
    if(i==n-1 && j==m-1) return 1;
    if(~ret){
            return ret;
    }
    ret=0;
    ret=(ret%MOD+dp(i+1,j)%MOD)%MOD;
    ret=(ret%MOD+dp(i,j+1)%MOD)%MOD;
    return ret;
}*/
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> s;
    sort(s.begin(),s.end());
    cout << s;
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ull unsigned long long
#define pi pair<ll,ll>
#define vi vector<ll>
#define sc second
#define ft first
#define p_q priority_queue
#define INF 10000000000
using namespace std;
const ll MOD=1e9+7;
const ll N=2e5+7;
ll n,j,ans=0,a[N];
string s;
/*ll dp(int i,int j){
    if( i==n || j==m || a[i][j]=='#') return 0;
    ll &ret=mem[i][j];
    if(i==n-1 && j==m-1) return 1;
    if(~ret){
            return ret;
    }
    ret=0;
    ret=(ret%MOD+dp(i+1,j)%MOD)%MOD;
    ret=(ret%MOD+dp(i,j+1)%MOD)%MOD;
    return ret;
}*/
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >>n >> s;
    sort(s.begin(),s.end());
    cout << s;
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ull unsigned long long
#define pi pair<ll,ll>
#define vi vector<ll>
#define sc second
#define ft first
#define p_q priority_queue
#define INF 10000000000
using namespace std;
const ll MOD=1e9+7;
const ll N=2e5+7;
ll n,j,ans=0,a[N];
string s;
/*ll dp(int i,int j){
    if( i==n || j==m || a[i][j]=='#') return 0;
    ll &ret=mem[i][j];
    if(i==n-1 && j==m-1) return 1;
    if(~ret){
            return ret;
    }
    ret=0;
    ret=(ret%MOD+dp(i+1,j)%MOD)%MOD;
    ret=(ret%MOD+dp(i,j+1)%MOD)%MOD;
    return ret;
}*/
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> >> n >> s;
    sort(s.begin(),s.end());
    cout << s;
    return 0;
}


//********************************************************************//
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define RANGE(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define DFOR(i, a, b) for(int i = a; i > b; --i)
#define DEB(x) cout << #x << ": " << x << endl
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define DISPV(v) { for(auto x___: v) cout << x___ << " "; cout << endl; }
#define DISPM(m) { for(auto x____: m){ cout << x____.first << ": " << x____.second << endl; } };
#define DISPMV(m) { for(auto x_____: m){ cout << x_____.first << ": " ;DISPV(x_____.second);} };
using LL = long long;
using VI = vector <int>;
using VL = vector <long long>;
using VVI = vector<VI>;
using VVL = vector <VL>;
using MII = map<int, int>;
using MIVI = map<int, VI>;
using MLL = map<LL, LL>;
int READ_INT(){int temp;cin>>temp;return temp;}      // read an int
LL READ_LONG(){LL temp;cin>>temp;return temp;}      // read a long long

const int MOD = int(1e9) + 7;
const int INF = 1e9 + 5;
const double PI = acos(-1.0); //M_PI;
const double EPS = 1e-9;
//********************************************************************//

int main(){
    ios::sync_with_stdio(false);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n = READ_INT();
    vector<char>ans;
    map<char, int>f;
    string s;
    cin >> s;
    for(auto c: s)
        f[c] += 1;
    for(auto p: f){
        for(int i = 0; i < p.second; ++i)
            ans.push_back(p.first);
    }
    cout << string(ALL(ans)) << endl;
    return 0;
}

/* complie flags
-Wall -Wextra -pedantic -std=c++11 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector
*/


//********************************************************************//
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define RANGE(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define DFOR(i, a, b) for(int i = a; i > b; --i)
#define DEB(x) cout << #x << ": " << x << endl
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define DISPV(v) { for(auto x___: v) cout << x___ << " "; cout << endl; }
#define DISPM(m) { for(auto x____: m){ cout << x____.first << ": " << x____.second << endl; } };
#define DISPMV(m) { for(auto x_____: m){ cout << x_____.first << ": " ;DISPV(x_____.second);} };
using LL = long long;
using VI = vector <int>;
using VL = vector <long long>;
using VVI = vector<VI>;
using VVL = vector <VL>;
using MII = map<int, int>;
using MIVI = map<int, VI>;
using MLL = map<LL, LL>;
int READ_INT(){int temp;cin>>temp;return temp;}      // read an int
LL READ_LONG(){LL temp;cin>>temp;return temp;}      // read a long long

const int MOD = int(1e9) + 7;
const int INF = 1e9 + 5;
const double PI = acos(-1.0); //M_PI;
const double EPS = 1e-9;
//********************************************************************//

string combine(pair<int, char>a, pair<int, char>b){
    if(a.first < b.first)
        swap(a, b);
    int c1 = a.first, c2 = b.first, k = c2/2;
    vector<char>ans;
    RANGE(i, k)
        ans.push_back(b.second);
    RANGE(i,c1)
        ans.push_back(a.second);
    RANGE(i, c2-k)
        ans.push_back(b.second);

    return string(ALL(ans));
}

int main(){
    ios::sync_with_stdio(false);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n = READ_INT();
    vector<pair<int, char>>letters;
    map<char, int>f;
    string s;
    cin >> s;
    for(auto c: s)
        f[c] += 1;
    for(auto p: f)
        letters.push_back({p.second, p.first});

    sort(letters.rbegin(), letters.rend());
    // for(auto p: letters)
    //     cout << p.first << ": " << p.second << endl;

    vector<string>ans;
    int i = 0;
    while(i < letters.size()){
        if(i + 1 < letters.size())
            ans.push_back(combine(letters[i], letters[i+1]));
        else{
            string s(1, letters[i].second);
            ans.push_back(s);
        }
        i += 2;
    }
    for(auto v: ans)
        cout << v;
    cout << endl;
    return 0;
}

/* complie flags
-Wall -Wextra -pedantic -std=c++11 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector
*/


//********************************************************************//
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define RANGE(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define DFOR(i, a, b) for(int i = a; i > b; --i)
#define DEB(x) cout << #x << ": " << x << endl
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define DISPV(v) { for(auto x___: v) cout << x___ << " "; cout << endl; }
#define DISPM(m) { for(auto x____: m){ cout << x____.first << ": " << x____.second << endl; } };
#define DISPMV(m) { for(auto x_____: m){ cout << x_____.first << ": " ;DISPV(x_____.second);} };
using LL = long long;
using VI = vector <int>;
using VL = vector <long long>;
using VVI = vector<VI>;
using VVL = vector <VL>;
using MII = map<int, int>;
using MIVI = map<int, VI>;
using MLL = map<LL, LL>;
int READ_INT(){int temp;cin>>temp;return temp;}      // read an int
LL READ_LONG(){LL temp;cin>>temp;return temp;}      // read a long long

const int MOD = int(1e9) + 7;
const int INF = 1e9 + 5;
const double PI = acos(-1.0); //M_PI;
const double EPS = 1e-9;
//********************************************************************//

// string combine(pair<int, char>a, pair<int, char>b){
//     if(a.first < b.first)
//         swap(a, b);
//     int c1 = a.first, c2 = b.first, k = c2/2;
//     vector<char>ans;
//     RANGE(i, k)
//         ans.push_back(b.second);
//     RANGE(i,c1)
//         ans.push_back(a.second);
//     RANGE(i, c2-k)
//         ans.push_back(b.second);

//     return string(ALL(ans));
// }

string combine(pair<int, char>a, pair<int, char>b){
    int c1 = a.first, c2 = b.first;
    vector<char>ans;
    RANGE(i,c1)
        ans.push_back(a.second);
    RANGE(i, c2)
        ans.push_back(b.second);

    return string(ALL(ans));
}

int main(){
    ios::sync_with_stdio(false);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int n = READ_INT();
    vector<pair<int, char>>letters;
    map<char, int>f;
    string s;
    cin >> s;
    for(auto c: s)
        f[c] += 1;
    for(auto p: f)
        letters.push_back({p.second, p.first});

    sort(letters.rbegin(), letters.rend());
    // for(auto p: letters)
    //     cout << p.first << ": " << p.second << endl;

    vector<string>ans;
    int i = 0;
    while(i < letters.size()){
        if(i + 1 < letters.size())
            ans.push_back(combine(letters[i], letters[i+1]));
        else{
            string s(1, letters[i].second);
            ans.push_back(s);
        }
        i += 2;
    }
    // DISPV(ans);
    for(auto v: ans)
        cout << v;
    cout << endl;
    return 0;
}

/* complie flags
-Wall -Wextra -pedantic -std=c++11 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector
*/


#include<bits/stdc++.h>
using namespace std;

#define ll           long long
#define pii          pair<ll,ll>
#define bug(a)       cerr << #a << " : " << a << endl;
#define FastRead     ios_base::sync_with_stdio(false);cin.tie(NULL);

const int MAX = 1e6;

int main()
{
    int n;
    string s,s1="";
    cin >> n >> s;

    int fr[128] = {0};
    for(int i=0;i<n;i++)
        fr[s[i]]++;
    for(char i='a';i<='z';i++)
    {
        while(fr[i])
            cout << i , fr[i]--;
    }
    cout << endl;
}


#include<bits/stdc++.h>
using namespace std;

#define ll           long long
#define pii          pair<ll,ll>
#define bug(a)       cerr << #a << " : " << a << endl;
#define Open         freopen( "input.txt","r",stdin );
#define aaman0077     OpenTheDamnTestCases
#define FastRead     ios_base::sync_with_stdio(false);cin.tie(NULL);

const int MAX = 1e6;

int main()
{
#ifdef aaman007
    freopen( "input.txt","r",stdin );
#endif // aaman007

    int n;
    string s;

    while(cin >> n >> s)
    {
        sort(s.begin(),s.end());
        cout << s << endl;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll           long long
#define pii          pair<ll,ll>
#define bug(a)       cerr << #a << " : " << a << endl;
#define Open         freopen( "input.txt","r",stdin );
#define aaman0077    OpenTheDamnTestCases
#define FastRead     ios_base::sync_with_stdio(false);cin.tie(NULL);

const int MAX = 1e6;

int main()
{
#ifdef aaman007
    Open
#endif // aaman007

    int n;
    string s;

    while(cin >> n >> s)
    {
        sort(s.begin(),s.end());
        cout << s << endl;
    }
}


#include<iostream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=2e5+10;
int ma[30];
int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        char k;
        cin>>k;
        ma[k-'a']++;
    }
    for(int i=0;i<26;i++)
    {
        for(int j=1;j<=ma[i];j++)
        {
            printf("%c",'a'+i);
        }
    }
    cout<<endl;;
    return 0;
}


#include<iostream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=2e5+10;
int ma[30];
int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        char k;
        cin>>k;
        ma[k-'a']++;
    }
    for(int i=0;i<26;i++)
    {
        for(int j=1;j<=ma[i];j++)
        {
            printf("%c",'a'+i);
        }
    }
    cout<<endl;
    return 0;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define pb push_back
#define maxn 132800
#define mmaxn 1000000000
#define pii pair<int,int>
#define pll pair<ll int,ll int>
#define pdd pair<double,double>
#define MOD 1000000007
#define MAX 15000003
#define f first
#define s second
#define ld long double
using namespace std;

map<char,int> y;

bool func(char a,char b){
    if(y[a]>=y[b]){
        return true;
    }
    return false;
}

int main(){
    int n;
    cin>>n;
    string x;
    cin>>x;

    for(auto i:x){
        y[i]++;
    }

    if(y.size()==1){
        cout<<x<<endl;
        return 0;
    }
    vector<char> zz;

    for(auto i:y){
        zz.pb(i.f);
    }

    sort(zz.begin(),zz.end(),func);

    vector<char> ans(n);

    set<int> occ;

    for(int i=0;i<n;i++){
        occ.insert(i);
    }

    for(auto i:zz){
        char z = i;
        int cnt = y[i];
        int pos = *occ.begin();
        // cout<<cnt<<endl;
        while(cnt-- and pos<n){
            y[i]--;
            occ.erase(pos);
            ans[pos]=z;
            pos+=2;
        }
    }

    for(auto i:zz){
        char z = i;
        int cnt = y[i];
        int pos = *occ.begin();
        // cout<<cnt<<endl;
        while(cnt-- and pos<n){
            y[i]--;
            occ.erase(pos);
            ans[pos]=z;
            pos+=2;
        }
    }

    // ans.pop_front();

    for(auto i:ans){
        cout<<i;
    }
    cout<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define pb push_back
#define maxn 132800
#define mmaxn 1000000000
#define pii pair<int,int>
#define pll pair<ll int,ll int>
#define pdd pair<double,double>
#define MOD 1000000007
#define MAX 15000003
#define f first
#define s second
#define ld long double
using namespace std;

map<char,int> y;

bool func(char a,char b){
    if(y[a]>=y[b]){
        return true;
    }
    return false;
}

int main(){
    int n;
    cin>>n;
    string x;
    cin>>x;

    for(auto i:x){
        y[i]++;
    }

    vector<char> zz;

    for(auto i:y){
        zz.pb(i.f);
    }

    sort(zz.begin(),zz.end(),func);

    vector<char> ans(n);

    set<int> occ;

    for(int i=0;i<n;i++){
        occ.insert(i);
    }

    for(auto i:zz){
        char z = i;
        int cnt = y[i];
        int pos = *occ.begin();
        // cout<<cnt<<endl;
        while(cnt--){
            occ.erase(pos);
            ans[pos]=z;
            pos+=2;
        }
    }

    // ans.pop_front();

    for(auto i:ans){
        cout<<i;
    }
    cout<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define pb push_back
#define maxn 132800
#define mmaxn 1000000000
#define pii pair<int,int>
#define pll pair<ll int,ll int>
#define pdd pair<double,double>
#define MOD 1000000007
#define MAX 15000003
#define f first
#define s second
#define ld long double
using namespace std;

map<char,int> y;

bool func(char a,char b){
    if(y[a]>=y[b]){
        return true;
    }
    return false;
}

int main(){
    int n;
    cin>>n;
    string x;
    cin>>x;

    for(auto i:x){
        y[i]++;
    }

    if(y.size()==1){
        cout<<x<<endl;
        return 0;
    }
    vector<char> zz;

    for(auto i:y){
        zz.pb(i.f);
    }

    sort(zz.begin(),zz.end(),func);

    vector<char> ans(n);

    set<int> occ;

    for(int i=0;i<n;i++){
        occ.insert(i);
    }

    for(auto i:zz){
        char z = i;
        int pos = *occ.begin();

        while(y[i]>0 and pos<n){
            y[i]--;
            occ.erase(pos);
            ans[pos]=z;
            pos+=2;
        }
    }

    for(auto i:zz){
        char z = i;
        int pos = *occ.begin();
        // cout<<cnt<<endl;
        while( y[i]>0 and pos<n){
            y[i]--;
            occ.erase(pos);
            ans[pos]=z;
            pos+=2;
        }
    }

    // ans.pop_front();

    for(auto i:ans){
        cout<<i;
    }
    cout<<endl;
}


#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define pb push_back
#define maxn 132800
#define mmaxn 1000000000
#define pii pair<int,int>
#define pll pair<ll int,ll int>
#define pdd pair<double,double>
#define MOD 1000000007
#define MAX 15000003
#define f first
#define s second
#define ld long double
using namespace std;

map<char,int> y;

bool func(char a,char b){
    if(y[a]>=y[b]){
        return true;
    }
    return false;
}

int main(){
    int n;
    cin>>n;
    string x;
    cin>>x;

    for(auto i:x){
        y[i]++;
    }

    for(auto i:y){
        while(y[i.f]>0){
            cout<<i.f;
            y[i.f]--;
        }
    }

    cout<<endl;

}


#include <stdio.h>
//#include <conio.h>
#include <string>
#include <vector>
#include <math.h>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <stdlib.h>
#include <iostream>
#include <sstream>
using namespace std;
int n;
string s, res;
vector<int> v(26);
vector<pair<char, int>> ch, le;
bool option(const pair<char, int> &a, const pair<char, int> &b)
{
	return (a.second < b.second);
}
bool option2(const pair<char, int> &a, const pair<char, int> &b)
{
	return (a.second > b.second);
}
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> s;
	for (int i = 0; i < n; i++)
		v[s[i] - 'a'] += 1;
	for (int i=0; i<26; i++)
		if (v[i]>0)
			if (v[i]%2==0)
				ch.push_back(pair<char, int>('a' + i, v[i]));
			else
				le.push_back(pair<char, int>('a' + i, v[i]));
	sort(ch.begin(), ch.end(), option);
	sort(le.begin(), le.end(), option2);
	for (int i = 0; i < le.size(); i++)
		if (ch.size() == 0)
		{
			for (int j = 0; j < le[i].second; j++)
				cout << le[i].first;
		}
		else
		{
			pair<char, int> pch=ch[ch.size()-1], ple=le[i];
			string st = "";
			st += ple.first, ple.second -= 1;
			int cntc=pch.second, cntl = ple.second;
			for (int i = 0; i < min(pch.second, ple.second) / 2; i++)
			{
				st += pch.first, st += ple.first;
				st = pch.first + st, st = ple.first + st;
				cntc -= 2, cntl -= 2;
			}
			for (int i = 0; i < cntc / 2; i++)
				st += pch.first, st = pch.first + st;
			for (int i = 0; i < cntl / 2; i++)
				st += ple.first, st = ple.first + st;
			cout << st;
			ch.pop_back();
		}
	string st = "";
	int chk;
	do
	{
		chk = 0;
		for (int i=0; i<ch.size(); i++)
			if (ch[i].second > 0)
			{
				st += ch[i].first, st = ch[i].first + st;
				ch[i].second -= 2;
				chk = 1;
			}
	} while (chk);

	cout << st;

	//_getch();
	return 0;
}


#include <stdio.h>
//#include <conio.h>
#include <string>
#include <vector>
#include <math.h>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <stdlib.h>
#include <iostream>
#include <sstream>
using namespace std;
int n;
string s;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> s;
	sort(s.begin(), s.end());
	cout << s;
	//_getch();
	return 0;
}


#include <stdio.h>
//#include <conio.h>
#include <string>
#include <vector>
#include <math.h>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <stdlib.h>
#include <iostream>
#include <sstream>
using namespace std;
int n;
string s, res;
vector<int> v(26);
vector<pair<char, int>> ch, le;
bool option(const pair<char, int> &a, const pair<char, int> &b)
{
	return (a.second < b.second);
}
bool option2(const pair<char, int> &a, const pair<char, int> &b)
{
	return (a.second > b.second);
}
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> s;
	for (int i = 0; i < n; i++)
		v[s[i] - 'a'] += 1;
	for (int i=0; i<26; i++)
		if (v[i]>0)
			if (v[i]%2==0)
				ch.push_back(pair<char, int>('a' + i, v[i]));
			else
				le.push_back(pair<char, int>('a' + i, v[i]));
	sort(ch.begin(), ch.end(), option2);
	sort(le.begin(), le.end(), option);
	for (int i = 0; i < le.size(); i++)
		if (ch.size() == 0)
		{
			for (int j = 0; j < le[i].second; j++)
				cout << le[i].first;
		}
		else
		{
			pair<char, int> pch=ch[ch.size()-1], ple=le[i];
			string st = "";
			st += ple.first, ple.second -= 1;
			int cntc=pch.second, cntl = ple.second;
			for (int i = 0; i < min(pch.second, ple.second) / 2; i++)
			{
				st += pch.first, st += ple.first;
				st = pch.first + st, st = ple.first + st;
				cntc -= 2, cntl -= 2;
			}
			for (int i = 0; i < cntc / 2; i++)
				st += pch.first, st = pch.first + st;
			for (int i = 0; i < cntl / 2; i++)
				st += ple.first, st = ple.first + st;
			cout << st;
			ch.pop_back();
		}
	string st = "";
	int chk;
	do
	{
		chk = 0;
		for (int i=0; i<ch.size(); i++)
			if (ch[i].second > 0)
			{
				st += ch[i].first, st = ch[i].first + st;
				ch[i].second -= 2;
				chk = 1;
			}
	} while (chk);

	cout << st;

	//_getch();
	return 0;
}


#include <stdio.h>
//#include <conio.h>
#include <string>
#include <vector>
#include <math.h>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <stdlib.h>
#include <iostream>
#include <sstream>
using namespace std;
int n;
string s, res;
vector<int> v(26);
vector<pair<char, int>> ch, le;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	cin >> n >> s;
	for (int i = 0; i < n; i++)
		v[s[i] - 'a'] += 1;
	for (int i=0; i<26; i++)
		if (v[i]>0)
			if (v[i]%2==0)
				ch.push_back(pair<char, int>('a' + i, v[i]));
			else
				le.push_back(pair<char, int>('a' + i, v[i]));
	for (int i = 0; i < le.size(); i++)
		if (ch.size() == 0)
		{
			for (int j = 0; j < le[i].second; j++)
				cout << le[i].first;
		}
		else
		{
			pair<char, int> pch=ch[ch.size()-1], ple=le[i];
			string st = "";
			for (int i = 0; i < ple.second; i++)
				st += ple.first;
			for (int i = 0; i < pch.second / 2; i++)
				st += pch.first, st = pch.first + st;
			cout << st;
			ch.pop_back();
		}
	string st = "";
	for (int i = 0; i < ch.size(); i++)
		for (int j = 0; j < ch[i].second / 2; j++)
			st += ch[i].first, st = ch[i].first + st;
	cout << st;

	//_getch();
	return 0;
}


#include "bits/stdc++.h"

using namespace std;
using ll = long long;

const long long inf = 1e9;
#define fr(i,a,n) for (int i=a;i<n;i++)
#define rfr(i,n,a) for (int i=n;i>=a;i--)
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
#define endl "\n"
typedef vector<int> VI;
typedef vector<ll> VL;
typedef priority_queue<int> Pqi;
typedef priority_queue<ll> Pql;

ll n, m, k;

int main () {
	cin >> n;
	string s;
	cin >> s;
	sort(s.begin(),s.end());
	cout << s << endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 101000;
#define ll long long
#define fr(i,a,n) for (int i=a;i<n;i++)
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define vipb(v) int x;cin>>x;v.pb(x);
#define vllpb(v) ll x;cin>>x;v.pb(x);
typedef vector<int> VI;

ll n, m;

vector<pair <int, char > > let;

string solv() {
	VI zs;
	char word[100001];
	int i = 0, j = n - 1;
	if (n % 2 != 0) {
		zs.pb(n / 2);
	}
	for (int ii = 0; ii < let.size(); ii++) {
		bool b = 0;
		if (let[ii].first % 2 == 0) {
			for (int k = 0; k < let[ii].first / 2; k++) {
				word[i++] = let[ii].second;
				word[j--] = let[ii].second;
				let[ii].first -= 2;
				if (i == j) {
					b = true;
					break;
				}
			}
		}
		else {
			word[i++] = let[ii].second;
			zs.pb(j);
			j--;
			let[ii].first--;
			if (i == j) {
				b = true;
			}
			if (!b) {
				for (int k = 0; k < let[ii].first / 2; k++) {
					word[i++] = let[ii].second;
					word[j--] = let[ii].second;
					let[ii].first -= 2;
					if (i == j) {
						b = true;
						break;
					}
				}
			}
		}
		if (b) {
			break;
		}
	}
	sort(let.begin(), let.end());
	for (int i = 0; i < zs.size(); i++) {
		for (int j = let.size() - 1; j >= 0; j--) {
			if (let[j].first > 0) {
				word[zs[i]] = let[j].second;
				let[j].first--;
				break;
			}
		}
	}
	string ans = "";
	for (int i = 0; i < n; i++) {
		ans += word[i];
	}
	return ans;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n;
	string x;
	cin >> x;
	int arr[27];
	memset(arr, 0, sizeof arr);
	for (int i = 0; i < x.size(); i++) {
		arr[x[i] - 'a']++;
	}
	for (int i = 0; i < 27; i++) {
		int s;
		char ch;
		ch = i + 'a';
		s = arr[i];
		if (s == 0)
			continue;
		let.pb(mp(s, ch));
	}
	sort(let.begin(), let.end());
	cout << solv();
	return 0;
}


#include "bits/stdc++.h"

using namespace std;
using ll = long long;

const long long inf = 1e9;
#define fr(i,a,n) for (int i=a;i<n;i++)
#define rfr(i,n,a) for (int i=n;i>=a;i--)
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
#define endl "\n"
typedef vector<int> VI;
typedef vector<ll> VL;
typedef priority_queue<int> Pqi;
typedef priority_queue<ll> Pql;

ll n, m, k;

int main () {
	cin >> n;
	VI ch(27);
	fr(i,0,n) {
		char x;
		cin >> x;
		ch[x - 'a']++;
	}
	vector<pii> v;
	fr(i,0,27) {
		if (ch[i]) {
			v.pb({ch[i],i});
		}
	}
	sort(v.rbegin(),v.rend());
	vector<char> ans1,ans2;
	char mid;
	for (auto &x:v) {
		if (x.first % 2) {
			x.first--;
			mid = x.second + 'a';
			break;
		}
	}
	for (auto &x:v) {
		while (x.first > 1) {
			ans1.pb(x.second + 'a');
			ans2.pb(x.second + 'a');
			x.first -= 2;
		}
	}
	for (auto x:v) {
		while (x.first) {
			if (ans1.size() <= ans2.size())
				ans1.pb(x.second + 'a');
			else
				ans2.pb(x.second + 'a');
			x.first--;
		}
	}
	reverse(ans2.begin(),ans2.end());
	for (auto x:ans1)
		cout << x;
	if (n % 2)
		cout << mid;
	for (auto x:ans2)
		cout << x;
	if (n % 2 == 0)
		cout << mid;
	cout << endl;
	return 0;
}


/*input
16
gagadbcgghhchbdf
*/

#include <iostream>
#include <climits>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef long long int ll;
#define MOD 1000000007

int main()
{
	ios_base::sync_with_stdio(false);

	int n;
	cin>>n;
	string s;
	cin>>s;

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

	cout<<s;

	// your code goes here
	return 0;
}


/*input
5
oolol
*/

#include <iostream>
#include <climits>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef long long int ll;
#define MOD 1000000007

int main()
{
	ios_base::sync_with_stdio(false);

	int n;
	cin>>n;
	string s;
	cin>>s;

	int a[26] = {0};

	for(int i=0;i<n;i++)
		a[s[i]-'a']++;

	int ind = 0;

	for(int i=0;i<26;i++)
	{
		while(a[i])
		{
			s[ind] = (i + 'a');
			ind++;
			a[i]--;
		}
	}

	cout<<s;

	// your code goes here
	return 0;
}


/*input
5
oolol
*/

#include <iostream>
#include <climits>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef long long int ll;
#define MOD 1000000007

int main()
{
	ios_base::sync_with_stdio(false);

	int n;
	cin>>n;
	string s;
	cin>>s;

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

	cout<<s;

	// your code goes here
	return 0;
}


/*input
16
aabbccddggggfhhh
*/

#include <iostream>
#include <climits>
#include <cstring>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef long long int ll;
#define MOD 1000000007

int main()
{
	ios_base::sync_with_stdio(false);

	ll n;
	string s;
	cin>>n>>s;

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

	cout<<s;

	// your code goes here
	return 0;
}


/** Author : Parth Prajapati
 * 	Institute : Pandit Deendayal Petroleum University
**/
#include<bits/stdc++.h>

using namespace std;

#define l long // -2^31 to +2^31-1 (upper limit ~ 2*(10^9))
#define ul unsigned long // 0 to +2^32-1
#define ll long long // -2^63 to +2^63-1 (upper limit ~ 9*(10^18))
#define ull unsigned long long // 0 to +2^64-1
#define mod(x, m) ((((x)%(m))+(m))%(m))
#define vi vector<int>
#define pi pair<int,int>
#define vl vector<ll int>
#define pl pair<ll int,ll int>
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

const ll MOD = 1e9 + 7;
const double pie = 3.141592653589793;
const ll int MD = 998244353 ;

#define setcount(x) __builtin_popcount(x) // counts set bits
#define parity(x) __builtin_parity(x) // checks parity of the number
#define lzcount(x) __builtin_clz(x) // count leading zeros in binary representation of number
#define tzcount(x) __builtin_ctz(x) // count trailing zeros in binary representation of number

template<typename T> T inf() { return (T)__builtin_inf();} // syntax for use inf<datatype>();
template<typename T> T gcd(T a,T b){ if(b>a) return gcd(b,a);return b==0?a:gcd(b,a%b); }
template<typename T> T lcm(T a, T b) { return (a*b)/gcd(a,b); }
template<typename T> T fast_power(T x,T y,ll m=MOD){T ans=1;while(y>0){if(y&1LL) ans=(ans*x)%m;y>>=1LL;x=(x*x)%m;}return ans%m;}

string IntToString(ll a){ ostringstream temp; temp << a; return temp.str();}
ll findMMI_fermat(ll n,ll M) {ll ans= fast_power(n,M-2,M);return ans;}//i.e In (a/b)%M..it calculates MMI of b wrt M,only if M is prime
ll add(ll a,ll b,ll M) { return ( mod(a,M ) + mod(b,M ))%M; }
ll sub(ll a, ll b,ll M) { return (mod(a,M ) + M - mod(b,M ))%M; }
ll mult(ll a,ll b,ll M) { return  ( mod(a,M)*mod(b,M) ) %M ; }
bool isprime(ll a){ if(a==2) {return 1;}if(!(a&1) ) {return 0;}for(ll i=3;i*i<=a;i+=2){if(a%i==0) {return 0;} } return 1;}

/************************** main program **************************/

int main()
{
	FASTIO
	//code
	int n;
	string s;
	cin>>n>>s;
	sort(s.begin(),s.end());
	cout<<s;
	return 0;
}


/** Author : Parth Prajapati
 * 	Institute : Pandit Deendayal Petroleum University
**/
#include<bits/stdc++.h>

using namespace std;

#define l long // -2^31 to +2^31-1 (upper limit ~ 2*(10^9))
#define ul unsigned long // 0 to +2^32-1
#define ll long long // -2^63 to +2^63-1 (upper limit ~ 9*(10^18))
#define ull unsigned long long // 0 to +2^64-1
#define mod(x, m) ((((x)%(m))+(m))%(m))
#define vi vector<int>
#define pi pair<int,int>
#define vl vector<ll int>
#define pl pair<ll int,ll int>
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

const ll MOD = 1e9 + 7;
const double pie = 3.141592653589793;
const ll int MD = 998244353 ;

#define setcount(x) __builtin_popcount(x) // counts set bits
#define parity(x) __builtin_parity(x) // checks parity of the number
#define lzcount(x) __builtin_clz(x) // count leading zeros in binary representation of number
#define tzcount(x) __builtin_ctz(x) // count trailing zeros in binary representation of number

template<typename T> T inf() { return (T)__builtin_inf();} // syntax for use inf<datatype>();
template<typename T> T gcd(T a,T b){ if(b>a) return gcd(b,a);return b==0?a:gcd(b,a%b); }
template<typename T> T lcm(T a, T b) { return (a*b)/gcd(a,b); }
template<typename T> T fast_power(T x,T y,ll m=MOD){T ans=1;while(y>0){if(y&1LL) ans=(ans*x)%m;y>>=1LL;x=(x*x)%m;}return ans%m;}

string IntToString(ll a){ ostringstream temp; temp << a; return temp.str();}
ll findMMI_fermat(ll n,ll M) {ll ans= fast_power(n,M-2,M);return ans;}//i.e In (a/b)%M..it calculates MMI of b wrt M,only if M is prime
ll add(ll a,ll b,ll M) { return ( mod(a,M ) + mod(b,M ))%M; }
ll sub(ll a, ll b,ll M) { return (mod(a,M ) + M - mod(b,M ))%M; }
ll mult(ll a,ll b,ll M) { return  ( mod(a,M)*mod(b,M) ) %M ; }
bool isprime(ll a){ if(a==2) {return 1;}if(!(a&1) ) {return 0;}for(ll i=3;i*i<=a;i+=2){if(a%i==0) {return 0;} } return 1;}

/************************** main program **************************/

int main()
{
	FASTIO
	//code
	int n,i,j;
	string s,s1,s2;
	bool f=1;
	cin>>n>>s;
	s1.clear();
	vector<pair<int,int>> p(26);
	for(i=0;i<26;++i)
	{
		p[i].first = 0;
		p[i].second = i+97;
	}
	for(i=0;i<n;++i)
	{
		p[s[i]-'a'].first++;
	}
	sort(p.begin(),p.end());
	reverse(p.begin(),p.end());
	for(i=0;i<26;++i)
	{
		if(p[i].first%2 == 1)
		{
			s1 += char(p[i].second);
			p[i].first--;
			break;
		}
	}
	while(f)
	{
		for(i=0;i<26;++i)
		{
			s2.clear();
			if((p[i].first%2 == 0 && p[i].first != 0) || (p[i].first%2 == 1 && p[i].first > 1))
			{
				s2 += char(p[i].second);
				s1 += char(p[i].second);
				p[i].first -= 2;
			}
			s2 += s1;
			s1 = s2;
		}
		bool f1 = 0;
		for(i=0;i<26;++i)
		{
			if(p[i].first > 1)
			{
				f1 = 1;
				break;
			}
		}
		if(f1 == 0)	f=0;
	}
	for(i=0;i<26;++i)
	{
		if(p[i].first)	s1 += char(p[i].second);
	}
	cout<<s1;
	return 0;
}


/** Author : Parth Prajapati
 * 	Institute : Pandit Deendayal Petroleum University
**/
#include<bits/stdc++.h>

using namespace std;

#define l long // -2^31 to +2^31-1 (upper limit ~ 2*(10^9))
#define ul unsigned long // 0 to +2^32-1
#define ll long long // -2^63 to +2^63-1 (upper limit ~ 9*(10^18))
#define ull unsigned long long // 0 to +2^64-1
#define mod(x, m) ((((x)%(m))+(m))%(m))
#define vi vector<int>
#define pi pair<int,int>
#define vl vector<ll int>
#define pl pair<ll int,ll int>
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

const ll MOD = 1e9 + 7;
const double pie = 3.141592653589793;
const ll int MD = 998244353 ;

#define setcount(x) __builtin_popcount(x) // counts set bits
#define parity(x) __builtin_parity(x) // checks parity of the number
#define lzcount(x) __builtin_clz(x) // count leading zeros in binary representation of number
#define tzcount(x) __builtin_ctz(x) // count trailing zeros in binary representation of number

template<typename T> T inf() { return (T)__builtin_inf();} // syntax for use inf<datatype>();
template<typename T> T gcd(T a,T b){ if(b>a) return gcd(b,a);return b==0?a:gcd(b,a%b); }
template<typename T> T lcm(T a, T b) { return (a*b)/gcd(a,b); }
template<typename T> T fast_power(T x,T y,ll m=MOD){T ans=1;while(y>0){if(y&1LL) ans=(ans*x)%m;y>>=1LL;x=(x*x)%m;}return ans%m;}

string IntToString(ll a){ ostringstream temp; temp << a; return temp.str();}
ll findMMI_fermat(ll n,ll M) {ll ans= fast_power(n,M-2,M);return ans;}//i.e In (a/b)%M..it calculates MMI of b wrt M,only if M is prime
ll add(ll a,ll b,ll M) { return ( mod(a,M ) + mod(b,M ))%M; }
ll sub(ll a, ll b,ll M) { return (mod(a,M ) + M - mod(b,M ))%M; }
ll mult(ll a,ll b,ll M) { return  ( mod(a,M)*mod(b,M) ) %M ; }
bool isprime(ll a){ if(a==2) {return 1;}if(!(a&1) ) {return 0;}for(ll i=3;i*i<=a;i+=2){if(a%i==0) {return 0;} } return 1;}

/************************** main program **************************/

int main()
{
	FASTIO
	//code
	int n,i,j;
	string s,s1,s2;
	bool f=0;
	cin>>n>>s;
	s1.clear();
	vector<pair<int,int>> p(26);
	for(i=0;i<26;++i)
	{
		p[i].first = 0;
		p[i].second = i+97;
	}
	for(i=0;i<n;++i)
	{
		p[s[i]-'a'].first++;
	}
	sort(p.begin(),p.end());
	for(i=0;i<26;++i)
	{
		if(p[i].first%2 == 1 && p[i].first!=1)
		{
			f = 1;
			for(j=0;j<p[i].first;++j)
			{
				s1 += char(p[i].second);
			}
			p[i].first = 0;
			break;
		}
	}
	if(!f)
	{
		for(i=0;i<26;++i)
		{
			if(p[i].first%2 == 1)
			{
				f = 1;
				for(j=0;j<p[i].first;++j)
				{
					s1 += char(p[i].second);
				}
				break;
			}
		}
	}
	for(i=0;i<26;++i)
	{
		s2.clear();
		for(j=0;j<(p[i].first/2);++j)
		{
			s2 += char(p[i].second);
			s1 += char(p[i].second);
		}
		if(p[i].first%2 == 0)	p[i].first = 0;
		else	p[i].first = 1;
		s2 += s1;
		s1 = s2;
	}
	for(i=0;i<26;++i)
	{
		if(p[i].first)	s1 += char(p[i].second);
	}
	cout<<s1;
	return 0;
}


#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <utility>
#include <deque>
#include <list>
#include <sstream>
#include <fstream>
#include <complex>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <iostream>
#include <utility>
#include <iterator>
#include <numeric>
#include <climits>
#include <iomanip>

using namespace std;

#define fr(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i,n) for (int i = 0, _n = (n); i < _n; i++)
#define repr(i,n) for (int i = n - 1; i >= 0; i--)

#define ll long long
#define ld double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second

typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif

    ll n;
    cin >> n;
    string s;
    cin >> s;
    int c[26];
    for(int i=0; i<26; i++)
    	c[i] = 0;
    for(ll i=0; i<n; i++)
    {
    	int x = s[i]-'a';
    	c[x]++;
    }
    char ans[n];
    int x = 0;
    int y = 1;
    ll i = 0;
    while(i<n)
    {
    	while((c[x]==0 || x==y) && x<=26)
    	{
    		x++;
    	}
    	while((c[y]==0 || y==x) && y<=26)
    		y++;
    	if((c[x]<=c[y] && c[x]!=c[y]-1) || c[x]-1==c[y])
    	{
    		if(x<26)
	    	{
	    		ans[i] = 'a' + x;
	    		i++;
	    		c[x]--;
	    	}
	    	if(y<26)
	    	{
	    		ans[i] = 'a' + y;
	    		c[y]--;
	    		i++;
	    	}
    	}
    	else
    	{
    		if(y<26)
	    	{
	    		ans[i] = 'a' + y;
	    		c[y]--;
	    		i++;
	    	}
	    	if(x<26)
	    	{
	    		ans[i] = 'a' + x;
	    		c[x]--;
	    		i++;
	    	}
    	}

    }
    for(ll i =0; i<n; i++)
    	cout << ans[i];
    cout << endl;
}


#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <utility>
#include <deque>
#include <list>
#include <sstream>
#include <fstream>
#include <complex>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <iostream>
#include <utility>
#include <iterator>
#include <numeric>
#include <climits>
#include <iomanip>

using namespace std;

#define fr(i,a,b) for (int i = (a), _b = (b); i <= _b; i++)
#define frr(i,a,b) for (int i = (a), _b = (b); i >= _b; i--)
#define rep(i,n) for (int i = 0, _n = (n); i < _n; i++)
#define repr(i,n) for (int i = n - 1; i >= 0; i--)

#define ll long long
#define ld double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second

typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif

    ll n;
    cin >> n;
    string s;
    cin >> s;
    pair<int, int> c[26];
    char ans[n];
    for(int i=0; i<26; i++)
    	c[i] = mp(0,i);
    for(ll i=0; i<n; i++)
    {
    	int x = s[i]-'a';
    	c[x].first++;
    }
    sort(c,c+26);
    int r=25;
    ll x = 0;
    while(c[r].first>0)
    {
    	for(int i=0; i<c[r-1].first; i++)
    	{
    		ans[x] = 'a' + c[r].second;
    		ans[x+1] = 'a' + c[r-1].second;
    		x+=2;
    	}
    	c[r].first = c[r].first - c[r-1].first;
    	c[r-1].first = 0;
    	if(c[r].first!=0)
    	{
    		c[r].first--;
    		ans[x] = 'a' + c[r].second;
    		x++;
    	}
    	sort(c,c+26);
    }
    for(ll i =0; i<n; i++)
    	cout << ans[i];
    cout << endl;
}