#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
using namespace std;

ll n,ans[3000000],dist='z'-'a'+1;
string s;
pair<ll,ll> f[30];
set<ll> pos;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);

    cin >> n >> s;
    for(ll i=0; i<n; i++) f[s[i]-'a'].fi--,f[s[i]-'a'].se=s[i]-'a';
    sort(f,f+'z'-'a');
    for(ll i=0; i<3000000; i++) ans[i]=-1,pos.insert(i);
    for(ll i=0; i<'z'-'a'+1; i++) f[i].fi*=-1;
    for(ll i=0; i<'z'-'a'+1; i++){
        if(f[i].fi<=1) continue;
       // cout << f[i].se << " " << f[i].fi << " " << *pos.begin() << endl;

        ll ini=*pos.begin();
        for(ll j=0; j<f[i].fi; j++){
            ans[ini+dist*j]=f[i].se;
            pos.erase(ini+dist*j);
        }
    }

    for(ll i=0; i<3000000; i++){
        if(ans[i]==-1) continue;
        cout << char(ans[i]+'a');
    }

    return 0;
}


#include<iostream>
#include<iomanip>
#include<string>
#include<time.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<vector>
#include<set>
#include<map>
#include<math.h>
#include<utility>
#define ll long long
#define endl "\n"
#define FIO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

void solve() {
    int n;
    char c;
    cin >> n;
    int cnt[128] = {};
    while(n--) {
        cin >> c;
        cnt[c]++;
    }
    for(int i = 97; i < 123; ++i) {
        while(cnt[i]--)
            cout << (char)i;
    }
}
int main() {
    FIO;
    //freopen("input.txt", "r", stdin);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


#include<iostream>
#include<iomanip>
#include<string>
#include<time.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<vector>
#include<set>
#include<map>
#include<math.h>
#include<utility>
#define ll long long
#define endl "\n"
#define FIO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

void solve() {
    int n;
    cin >> n;
    int cnt[128] = {};
    while(n--) {
        char c;
        cin >> c;
        cnt[c]++;
    }
    for(int i = 0; i < 128; ++i) {
        while(cnt[i]--)
            cout << (char)i;
    }
}
int main() {
    FIO;
    //freopen("input.txt", "r", stdin);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


#include<iostream>
#include<iomanip>
#include<string>
#include<time.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<vector>
#include<set>
#include<map>
#include<math.h>
#include<utility>
#define ll long long
#define endl "\n"
#define FIO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

void solve() {
    int n;{
    char c;
    cin >> n;
    int cnt[128] = {};
    while(n--)
        cin >> c;
        cnt[c]++;
    }
    for(int i = 97; i < 123; ++i) {
        while(cnt[i]--)
            cout << (char)i;
    }
}
int main() {
    FIO;
    //freopen("input.txt", "r", stdin);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


#include<iostream>
#include<iomanip>
#include<string>
#include<time.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<vector>
#include<set>
#include<map>
#include<math.h>
#include<utility>
#define ll long long
#define endl "\n"
#define FIO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

void solve() {
    int n;
    char c;
    cin >> n;
    int cnt[128] = {};
    while(n--)
        cin >> c;
    cnt[c]++;
    for(int i = 97; i < 123; ++i) {
        while(cnt[i]--)
            cout << (char)i;
    }
}
int main() {
    FIO;
    //freopen("input.txt", "r", stdin);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <map>
#include <set>
#include <limits.h>
#include <utility>
#include <list>

using namespace std;

typedef pair<int,int> pii;
typedef pair<long long int, long long int> pll;
typedef pair<int,long long int> pil;
typedef long long int ll;

struct data{
    char bukva;
    int povtoruva;
};

bool operator < (data a, data b) {
    return a.povtoruva > b.povtoruva;
}

map<char,int> converter;

void initConverter() {
    char  bukva = 'a';
    int idx = 0;

    while(bukva <= 'z') {
        converter[bukva] = idx;
        idx++;
        bukva++;
    }
}

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

   string s;

   cin >> s;

   char ans[n];

   int arr[26];
   memset(arr, 0, sizeof(arr));

    initConverter();
   for(int i = 0; i < s.size(); i++) {
        char bukva = s[i];
        int idx = converter[bukva];
        arr[idx]++;

   }

   vector<data> v;
   char currChar = 'a';
    int diff = 0;

    for(int i = 0; i < 26; i++) {
        if(arr[i] > 0) diff++;

        data temp;
        temp.bukva = currChar;
        currChar++;
        temp.povtoruva = arr[i];
        v.push_back(temp);
    }

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

    int idx = 0;

    if(diff % 2 == 0) {
        for(int i = 0; i < 26; i += 2) {
            while(v[i].povtoruva > 0) {
                ans[idx] = v[i].bukva;
                v[i].povtoruva--;
                idx++;

                if(v[i+1].povtoruva > 0) {
                    v[i+1].povtoruva--;
                    ans[idx] = v[i+1].bukva;
                    idx++;
                }
            }
        }

    } else {
        for(int i = 0; i < 26; i += 2) {
            if(v[i+3].povtoruva == 0) {
               int levo_prva = v[i].povtoruva/2;
               if(v[i].povtoruva % 2 != 0) levo_prva++;
               int levo_vtora = v[i+1].povtoruva/2;
               if(v[i+1].povtoruva % 2 != 0) levo_vtora++;

               v[i].povtoruva -= levo_prva;
               v[i+1].povtoruva -= levo_vtora;

               while(levo_prva > 0) {
                    ans[idx] = v[i].bukva;
                    idx++;
                    levo_prva--;
                    if(levo_vtora > 0) {
                        ans[idx] = v[i+1].bukva;
                        idx++;
                        levo_vtora--;
                    }
               }

               while(v[i+2].povtoruva > 0) {
                    ans[idx] = v[i+2].bukva;
                    idx++;
                    v[i+2].povtoruva--;
               }

               while(v[i+1].povtoruva > 0 || v[i].povtoruva > 0 ) {
                    if(v[i+1].povtoruva > 0) {
                        ans[idx] = v[i+1].bukva;
                        idx++;
                        v[i+1].povtoruva--;
                    }

                    if(v[i].povtoruva > 0) {
                        ans[idx] = v[i].bukva;
                        idx++;
                        v[i].povtoruva--;
                    }
               }

               break;
            } else {
                while(v[i].povtoruva > 0) {
                ans[idx] = v[i].bukva;
                v[i].povtoruva--;
                idx++;

                if(v[i+1].povtoruva > 0) {
                    v[i+1].povtoruva--;
                    ans[idx] = v[i+1].bukva;
                    idx++;
                }
            }
            }

        }

    }

    for(int i = 0; i < n; i++) {
        cout << ans[i];
    }

}


#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <map>
#include <set>
#include <limits.h>
#include <utility>
#include <list>

using namespace std;

typedef pair<int,int> pii;
typedef pair<long long int, long long int> pll;
typedef pair<int,long long int> pil;
typedef long long int ll;

struct data{
    char bukva;
    int povtoruva;
    int levo;
    int desno;
    bool special;
};

bool operator < (data a, data b) {
    return a.povtoruva > b.povtoruva;
}

map<char,int> converter;

void initConverter() {
    char  bukva = 'a';
    int idx = 0;

    while(bukva <= 'z') {
        converter[bukva] = idx;
        idx++;
        bukva++;
    }
}

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

   string s;

   cin >> s;

   char ans[n];

   int arr[26];
   memset(arr, 0, sizeof(arr));

    initConverter();
   for(int i = 0; i < s.size(); i++) {
        char bukva = s[i];
        int idx = converter[bukva];
        arr[idx]++;

   }

   vector<data> v;
   char currChar = 'a';

   for(int i = 0; i < 26; i++) {
        data temp;
        temp.bukva = currChar;
        temp.povtoruva = arr[i];
        if(arr[i] % 2 == 0) {
            temp.levo = arr[i] / 2;
            temp.desno = arr[i] / 2;
        } else {
            temp.levo = arr[i] / 2 + 1;
            temp.desno = arr[i] / 2;
        }

        if(arr[i] == 1) {
            temp.special = true;
        } else {
            temp.special = false;
        }
        v.push_back(temp);
        currChar++;
   }

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

   int idx = 0;

   bool stavi = true;

   while(stavi) {
        stavi = false;
        for(int i = 0; i < 26; i++) {
            if(v[i].special) continue;

            if(v[i].levo > 0) {
                stavi = true;
                ans[idx] = v[i].bukva;
                v[i].levo--;
                idx++;
            }
        }
   }

   for(int i = 0; i < 26; i++) {
        if(v[i].special) {
            ans[idx] = v[i].bukva;
            idx++;
        }
   }

   stavi = true;
    idx = n - 1;
   while(stavi) {
        stavi = false;
        for(int i = 0; i < 26; i++) {
            if(v[i].special) continue;

            if(v[i].desno > 0) {
                stavi = true;
                ans[idx] = v[i].bukva;
                v[i].desno--;
                idx--;
            }
        }
   }

    for(int i = 0 ; i < n; i++) {
        cout << ans[i];
    }

}


#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <map>
#include <set>
#include <limits.h>
#include <utility>
#include <list>

using namespace std;

typedef pair<int,int> pii;
typedef pair<long long int, long long int> pll;
typedef pair<int,long long int> pil;
typedef long long int ll;

int main() {

  int n;
  cin >> n;

  string s;
  cin >> s;
  sort(s.begin(), s.end());

  cout << s;

}


#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define sigma      signed main
#define int long long
#define fast_io    ios_base::sync_with_stdio(false);cin.tie(NULL);
#define test()     int t;cin>>t;while(t--)
#define f(i,a,b)   for(int i=a;i<b;i++)
#define pb         push_back
#define mp         make_pair
#define all(x)     x.begin(),x.end()
#define sortall(x) sort(all(x))
#define pii        pair<int,int>
#define vi         vector<int>
#define vvi        vector<vector<int>>
#define qi         queue<int>
#define vpii       vector<pii>
#define umap       unordered_map<int,int>
#define setbits    __builtin_popcount
#define F          first
#define S          second
#define ub         upper_bound
#define lb         lower_bound
#define mod        1000000007
#define PI 	       3.1415926535897932384626
#define infinity   INT_MAX
#define endl 	   "\n"
#define leadzero(a) __builtin_clz(a) // count leading zeroes
#define trailzero(a) __builtin_ctz(a) // count trailing zeroes
#define bitcount(a) __builtin_popcount(a) // count set bits (add ll)

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)

sigma()
{
    fast_io;
    int n; cin>>n;
    string s; cin>>s;
    vector<int> freq(27, 0);
    f(i,0,s.length()) freq[s[i]-'a'+1]++;

    int idx=-1;
    int cnt=0;
    vector<pii> frt;
    vector<pii> bck;

    f(i,1,27) {
        if(freq[i] > cnt && freq[i]%2==1)  {
            idx=i;
            cnt=freq[i];
        }
    }
    vector<int> reserve;
    f(i,1,27)
    {
        if(freq[i] >0)
        {
            if(i==idx)continue;
            if(freq[i]%2==0)
            {
               frt.pb({i, freq[i]/2});
               bck.pb({i, freq[i]/2});
            }else
            {
               frt.pb({i, freq[i]/2});
               bck.pb({i, freq[i]/2});
               reserve.pb(i);
            }
        }
    }
    if(cnt!=0) frt.pb({idx, cnt});
    reverse(all(bck));

    int a=frt.size() ;
    f(i,0,a)
    {
        char x=frt[i].F+96;
        int b=frt[i].S;
        f(j,0,b)cout<<x;
    }
    a=bck.size() ;
    f(i,0,a)
    {
        char x=bck[i].F+96;
        int b=bck[i].S;
        f(j,0,b)cout<<x;
    }
    a=reserve.size();
    f(i,0,a){
        char x=reserve[i]+96;
        cout<<x;
    }

}


#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define sigma      signed main
#define int long long
#define fast_io    ios_base::sync_with_stdio(false);cin.tie(NULL);
#define test()     int t;cin>>t;while(t--)
#define f(i,a,b)   for(int i=a;i<b;i++)
#define pb         push_back
#define mp         make_pair
#define all(x)     x.begin(),x.end()
#define sortall(x) sort(all(x))
#define pii        pair<int,int>
#define vi         vector<int>
#define vvi        vector<vector<int>>
#define qi         queue<int>
#define vpii       vector<pii>
#define umap       unordered_map<int,int>
#define setbits    __builtin_popcount
#define F          first
#define S          second
#define ub         upper_bound
#define lb         lower_bound
#define mod        1000000007
#define PI 	       3.1415926535897932384626
#define infinity   INT_MAX
#define endl 	   "\n"
#define leadzero(a) __builtin_clz(a) // count leading zeroes
#define trailzero(a) __builtin_ctz(a) // count trailing zeroes
#define bitcount(a) __builtin_popcount(a) // count set bits (add ll)

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)

sigma()
{
    fast_io;
    int n; cin>>n;
    string s; cin>>s;
    sort(all(s));
    cout<<s;
}


/*
	TRUST THE PROCESS....
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define md 1000000007
#define mx 1e18
#define pb push_back
#define read(n) scanf("%d",&n)
#define print(x) printf("%d",x)
#define endl '\n'
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pii pair<int,int>
#define ff first
#define ss second
#define f(a,b,c) for(int i=b;i<=c;i++)
#define T int t;cin>>t;while(t--)

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

int main()
{
	fastio
	#ifndef ONLINE_JUDGE
	freopen("input.txt" , "r" , stdin);
	freopen("output.txt" , "w" , stdout);
	#endif

	string s;
	cin>>s;

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

	cout<<s<<endl;

	return 0;
}


/*
	TRUST THE PROCESS....
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define md 1000000007
#define mx 1e18
#define pb push_back
#define read(n) scanf("%d",&n)
#define print(x) printf("%d",x)
#define endl '\n'
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pii pair<int,int>
#define ff first
#define ss second
#define f(a,b,c) for(int i=b;i<=c;i++)
#define T int t;cin>>t;while(t--)

int main()
{
	fastio
	#ifndef ONLINE_JUDGE
	freopen("input.txt" , "r" , stdin);
	freopen("output.txt" , "w" , stdout);
	#endif

	string s;
	cin>>s;

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

	cout<<s<<endl;

	return 0;
}


/*
	TRUST THE PROCESS....
*/

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define md 1000000007
#define mx 1e18
#define pb push_back
#define read(n) scanf("%d",&n)
#define print(x) printf("%d",x)
#define endl '\n'
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pii pair<int,int>
#define ff first
#define ss second
#define f(a,b,c) for(int i=b;i<=c;i++)
#define T int t;cin>>t;while(t--)

int main()
{
	fastio
	#ifndef ONLINE_JUDGE
	freopen("input.txt" , "r" , stdin);
	freopen("output.txt" , "w" , stdout);
	#endif

	int n;
	cin>>n;

	string s;
	cin>>s;

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

	cout<<s<<endl;

	return 0;
}


//####################################
//###  Himanshu Shukla @coldbeer  ####
//###  CSE NIT CALICUT            ####
//####################################

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define f(a, b) for (auto i = a; i < b; i++)
#define mp(a, b) make_pair(a, b)
#define p pair<int,int>
#define INF 0x3f3f3f3f
#define MAX 1000002

int main()
{
    int n;
    scanf("%d",&n);
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    cout<<s<<endl;
}


//####################################
//###  Himanshu Shukla @coldbeer  ####
//###  CSE NIT CALICUT            ####
//####################################

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define f(a, b) for (auto i = a; i < b; i++)
#define mp(a, b) make_pair(a, b)
#define p pair<int,int>
#define INF 0x3f3f3f3f
#define MAX 1000002
#define FAST ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

int main()
{
    int n;
    scanf("%d",&n);
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    cout<<s<<endl;
}


//####################################
//###  Himanshu Shukla @coldbeer  ####
//###  CSE NIT CALICUT            ####
//####################################

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define f(a, b) for (auto i = a; i < b; i++)
#define mp(a, b) make_pair(a, b)
#define p pair<int,int>
#define INF 0x3f3f3f3f
#define MAX 1000002
#define FAST ios_base::sync_with_stdio(0);

int main()
{
    int n;
    scanf("%d",&n);
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    cout<<s<<endl;
}


//####################################
//###  Himanshu Shukla @coldbeer  ####
//###  CSE NIT CALICUT            ####
//####################################

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define f(a, b) for (auto i = a; i < b; i++)
#define mp(a, b) make_pair(a, b)
#define p pair<int,int>
#define INF 0x3f3f3f3f
#define MAX 1000002

int main()
{
    int n;
    scanf("%d",&n);
    string str;
    cin>>str;
    sort(str.begin(),str.end());
    cout<<str<<endl;
}


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

#define gc getchar
#define rep(i,j,k) for(i=j; i<k; i++)
#define rrep(i,j,k) for(i=j; i>=k; i--)
#define repmat(i,j,n,m) for(i=0; i<n; i++) for(j=0; j<m; j++)
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); it++)
#define cinv(v,s,n) ll v_i; rep(v_i,s,n) cin>>v[v_i];
#define coutv(v,s,n) ll v_i; rep(v_i,s,n) cout<<v[v_i]<<" "; cout<<endl;
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define fin scan_int()
#define xx first
#define yy second
#define INOUT take_input_and_output_from_file();
#define TIME 1.0*clock()/CLOCKS_PER_SEC
mt19937 genrand(chrono::system_clock::now().time_since_epoch().count());
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
typedef long long ll;
typedef vector<ll > vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef pair<string,ll > psi;
typedef pair<ll ,ll > pii;

#define strtoint(s,n) if (!(istringstream(s) >> n) ) n = 0;
string inttostr(ll str){stringstream stream; stream << str; return stream.str();}
string numtobin(ll n) {string r = "";while(n) r = ((n&1) ? '1' : '0') + r, n >>= 1;return r;}
ll bintonum(string s) {ll n=0, p=1<<(s.length()-1);for(char i : s) n += (i-'0')*p, p>>=1;return n;}
ll modexpo(ll a,ll b,ll n){ll d=1;while(b){if(b&1)d=(d*a)%n;b>>=1;a=(a*a)%n;}return d;}
ll expo(ll a,ll b){ll d=1;while(b){if(b&1)d=d*a;b>>=1;a=a*a;}return d;}
inline ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
inline ll lcm(ll a, ll b) {return (a*b)/gcd(a,b);}
ll inv(ll a,ll m) {return modexpo(a,m-2,m);}
void take_input_and_output_from_file() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}
inline ll scan_int() {
    ll NR=0,sign=1;
    char c=gc();
    while( c < 48 || c > 57 ) {
        if(c=='-') sign=0;
        c=gc();
    }
    while(c>47 && c< 58) {
        NR = (NR << 3) + (NR << 1) + (c - 48);
        c=gc();
    }
    return (sign?NR:(-NR));
}

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

int main(){

    int n=fin;
    string s;
    cin>>s;
    map<char,int > c;
    int i;
    rep(i,0,n) c[s[i]]++;

    vector<pair<int, char> > v;
    tr(c, it) {
        v.pb({it->yy, it->xx});
    }
    sort(all(v));
    rep(i,0,v.size()) if(v[i].xx&1) break;

    string ans = "";
    ans += v[i].yy;
    v[i].xx = v[i].xx-1;

    rep(i,0,v.size()) {
        int j=v[i].xx;
        while(j>0) {
            ans += v[i].yy;
            j--;
        }
    }

    cout<<ans<<endl;
    return 0;
}


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

#define gc getchar
#define rep(i,j,k) for(i=j; i<k; i++)
#define rrep(i,j,k) for(i=j; i>=k; i--)
#define repmat(i,j,n,m) for(i=0; i<n; i++) for(j=0; j<m; j++)
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); it++)
#define cinv(v,s,n) ll v_i; rep(v_i,s,n) cin>>v[v_i];
#define coutv(v,s,n) ll v_i; rep(v_i,s,n) cout<<v[v_i]<<" "; cout<<endl;
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define fin scan_int()
#define xx first
#define yy second
#define INOUT take_input_and_output_from_file();
#define TIME 1.0*clock()/CLOCKS_PER_SEC
mt19937 genrand(chrono::system_clock::now().time_since_epoch().count());
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
typedef long long ll;
typedef vector<ll > vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef pair<string,ll > psi;
typedef pair<ll ,ll > pii;

#define strtoint(s,n) if (!(istringstream(s) >> n) ) n = 0;
string inttostr(ll str){stringstream stream; stream << str; return stream.str();}
string numtobin(ll n) {string r = "";while(n) r = ((n&1) ? '1' : '0') + r, n >>= 1;return r;}
ll bintonum(string s) {ll n=0, p=1<<(s.length()-1);for(char i : s) n += (i-'0')*p, p>>=1;return n;}
ll modexpo(ll a,ll b,ll n){ll d=1;while(b){if(b&1)d=(d*a)%n;b>>=1;a=(a*a)%n;}return d;}
ll expo(ll a,ll b){ll d=1;while(b){if(b&1)d=d*a;b>>=1;a=a*a;}return d;}
inline ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
inline ll lcm(ll a, ll b) {return (a*b)/gcd(a,b);}
ll inv(ll a,ll m) {return modexpo(a,m-2,m);}
void take_input_and_output_from_file() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}
inline ll scan_int() {
    ll NR=0,sign=1;
    char c=gc();
    while( c < 48 || c > 57 ) {
        if(c=='-') sign=0;
        c=gc();
    }
    while(c>47 && c< 58) {
        NR = (NR << 3) + (NR << 1) + (c - 48);
        c=gc();
    }
    return (sign?NR:(-NR));
}

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

int main(){

    int n=fin;
    string s;
    cin>>s;
    map<char,int > c;
    int i;
    rep(i,0,n) c[s[i]]++;

    vector<pair<int, char> > v;
    tr(c, it) {
        v.pb({it->yy, it->xx});
    }
    sort(all(v));
    reverse(all(v));

    string ans = "";
    if(!(v.size()&1)) {
        rep(i,0,v.size()) {
            string str = "";
            int j=v[i].xx, k=v[i+1].xx;
            while(j>0 && k>0) {
                str += v[i].yy;
                str += v[i+1].yy;
                j--;
                k--;
            }
            while(j > 0) {str += v[i].yy; j--;}
            while(k > 0) {str += v[i+1].yy; k--;}

            ans += str;
            i++;
        }
    }
    else {
        rep(i,0,v.size()-1) {
            string str = "";
            int j=v[i].xx, k=v[i+1].xx;
            while(j>0 && k>0) {
                str += v[i].yy;
                str += v[i+1].yy;
                j--;
                k--;
            }
            while(j > 0) {str += v[i].yy; j--;}
            while(k > 0) {str += v[i+1].yy; k--;}

            ans += str;
            i++;
        }
        int j=v[v.size()-1].xx;
        while(j--) {
            ans += v[v.size()-1].yy;
        }
    }
    cout<<ans<<endl;
    return 0;
}


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

#define gc getchar
#define rep(i,j,k) for(i=j; i<k; i++)
#define rrep(i,j,k) for(i=j; i>=k; i--)
#define repmat(i,j,n,m) for(i=0; i<n; i++) for(j=0; j<m; j++)
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); it++)
#define cinv(v,s,n) ll v_i; rep(v_i,s,n) cin>>v[v_i];
#define coutv(v,s,n) ll v_i; rep(v_i,s,n) cout<<v[v_i]<<" "; cout<<endl;
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define fin scan_int()
#define xx first
#define yy second
#define INOUT take_input_and_output_from_file();
#define TIME 1.0*clock()/CLOCKS_PER_SEC
mt19937 genrand(chrono::system_clock::now().time_since_epoch().count());
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
typedef long long ll;
typedef vector<ll > vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef pair<string,ll > psi;
typedef pair<ll ,ll > pii;

#define strtoint(s,n) if (!(istringstream(s) >> n) ) n = 0;
string inttostr(ll str){stringstream stream; stream << str; return stream.str();}
string numtobin(ll n) {string r = "";while(n) r = ((n&1) ? '1' : '0') + r, n >>= 1;return r;}
ll bintonum(string s) {ll n=0, p=1<<(s.length()-1);for(char i : s) n += (i-'0')*p, p>>=1;return n;}
ll modexpo(ll a,ll b,ll n){ll d=1;while(b){if(b&1)d=(d*a)%n;b>>=1;a=(a*a)%n;}return d;}
ll expo(ll a,ll b){ll d=1;while(b){if(b&1)d=d*a;b>>=1;a=a*a;}return d;}
inline ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
inline ll lcm(ll a, ll b) {return (a*b)/gcd(a,b);}
ll inv(ll a,ll m) {return modexpo(a,m-2,m);}
void take_input_and_output_from_file() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}
inline ll scan_int() {
    ll NR=0,sign=1;
    char c=gc();
    while( c < 48 || c > 57 ) {
        if(c=='-') sign=0;
        c=gc();
    }
    while(c>47 && c< 58) {
        NR = (NR << 3) + (NR << 1) + (c - 48);
        c=gc();
    }
    return (sign?NR:(-NR));
}

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

int main(){

    int n=fin;
    string s;
    cin>>s;
    map<char,int > c;
    int i;
    rep(i,0,n) c[s[i]]++;

    vector<pair<int, char> > v;
    tr(c, it) {
        v.pb({it->yy, it->xx});
    }
    sort(all(v));
    rep(i,0,v.size()) if(v[i].xx&1) break;

    string ans = "";
    ans += v[i].yy;
    v[i].xx = v[i].xx-1;

    rep(i,0,v.size()) {
        int j=v[i].xx;
        while(j>1) {
            ans += v[i].yy;
            ans = v[i].yy+ans;
            v[i].xx = v[i].xx-2;
            j -= 2;
        }
    }
    rep(i,0,v.size()) {
        if(v[i].xx) ans += v[i].yy;
    }

    cout<<ans<<endl;
    return 0;
}


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

#define gc getchar
#define rep(i,j,k) for(i=j; i<k; i++)
#define rrep(i,j,k) for(i=j; i>=k; i--)
#define repmat(i,j,n,m) for(i=0; i<n; i++) for(j=0; j<m; j++)
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); it++)
#define cinv(v,s,n) ll v_i; rep(v_i,s,n) cin>>v[v_i];
#define coutv(v,s,n) ll v_i; rep(v_i,s,n) cout<<v[v_i]<<" "; cout<<endl;
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define fin scan_int()
#define xx first
#define yy second
#define INOUT take_input_and_output_from_file();
#define TIME 1.0*clock()/CLOCKS_PER_SEC
mt19937 genrand(chrono::system_clock::now().time_since_epoch().count());
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
typedef long long ll;
typedef vector<ll > vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef pair<string,ll > psi;
typedef pair<ll ,ll > pii;

#define strtoint(s,n) if (!(istringstream(s) >> n) ) n = 0;
string inttostr(ll str){stringstream stream; stream << str; return stream.str();}
string numtobin(ll n) {string r = "";while(n) r = ((n&1) ? '1' : '0') + r, n >>= 1;return r;}
ll bintonum(string s) {ll n=0, p=1<<(s.length()-1);for(char i : s) n += (i-'0')*p, p>>=1;return n;}
ll modexpo(ll a,ll b,ll n){ll d=1;while(b){if(b&1)d=(d*a)%n;b>>=1;a=(a*a)%n;}return d;}
ll expo(ll a,ll b){ll d=1;while(b){if(b&1)d=d*a;b>>=1;a=a*a;}return d;}
inline ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
inline ll lcm(ll a, ll b) {return (a*b)/gcd(a,b);}
ll inv(ll a,ll m) {return modexpo(a,m-2,m);}
void take_input_and_output_from_file() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}
inline ll scan_int() {
    ll NR=0,sign=1;
    char c=gc();
    while( c < 48 || c > 57 ) {
        if(c=='-') sign=0;
        c=gc();
    }
    while(c>47 && c< 58) {
        NR = (NR << 3) + (NR << 1) + (c - 48);
        c=gc();
    }
    return (sign?NR:(-NR));
}

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

int main(){

    int n=fin;
    string s;
    cin>>s;
    map<char,int > c;
    int i;
    rep(i,0,n) c[s[i]]++;

    vector<pair<int, char> > v;
    tr(c, it) {
        v.pb({it->yy, it->xx});
    }
    sort(all(v));
    string ans="";

    rep(i,0,v.size()) {
        int j=v[i].xx;
        while(j>0) {
            ans += v[i].yy;
            j--;
        }
    }

    cout<<ans<<endl;
    return 0;
}


#include <algorithm>
#include <iostream>
#include <memory.h>
#include <iterator>
#include <cassert>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <bitset>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <stack>
#include <set>
#include <map>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) x.begin() , x.end()

typedef long long ll;
typedef long double ld;
typedef pair < ll , ll > pll;
typedef pair < int , int > pii;

template < typename T >
T read(){
    T p = 1 , x = 0;
    char s = getchar();
    while(s == ' ' || s == '\n') s = getchar();
    if(s == '-') p = -1 , s = getchar();
    while(s >= '0' && s <= '9'){
        x = x * 10 + s - '0';
        s = getchar();
    }
    return x * p;
}

template < typename A , typename B >
void Umax(A &a , const B &b){
    if(a < b)
        a = b;
}

template < typename A , typename B >
void Umin(A &a , const B &b){
    if(a > b){
        a = b;
    }
}

ll bin_pow (ll a , ll n) {
    if(n == 0){
        return 1;
    }
    if(n % 2 == 1){
        ll cnt = a * bin_pow(a , n - 1);
        return cnt;
    }
    else {
        ll cnt = bin_pow(a , n / 2);
        return cnt * cnt;
    }
}

const int N = (int) 1e6 + 10;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9 + 10;
const ll LLINF = (ll) 1e18 + 10;

/*void brute() {
    for(int i = 0; i < 51; ++i) {
        int ans = 0;
        cout << i << ' ';
        for(int j = 0; j < 51; ++j) {
            if(j == i - (j ^ i)) {
                cout << j << ' ';
                ans++;
            }
        }
        cout << " f" <<ans << endl;
    }
}*/

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

    int n;
    cin >> n;
    string s;
    cin >> s;
    sort(all(s));
    cout << s << endl;

    return 0;
}


#include <algorithm>
#include <iostream>
#include <memory.h>
#include <iterator>
#include <cassert>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <bitset>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <stack>
#include <set>
#include <map>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) x.begin() , x.end()

typedef long long ll;
typedef long double ld;
typedef pair < ll , ll > pll;
typedef pair < int , int > pii;

template < typename T >
T read(){
    T p = 1 , x = 0;
    char s = getchar();
    while(s == ' ' || s == '\n') s = getchar();
    if(s == '-') p = -1 , s = getchar();
    while(s >= '0' && s <= '9'){
        x = x * 10 + s - '0';
        s = getchar();
    }
    return x * p;
}

template < typename A , typename B >
void Umax(A &a , const B &b){
    if(a < b)
        a = b;
}

template < typename A , typename B >
void Umin(A &a , const B &b){
    if(a > b){
        a = b;
    }
}

ll bin_pow (ll a , ll n) {
    if(n == 0){
        return 1;
    }
    if(n % 2 == 1){
        ll cnt = a * bin_pow(a , n - 1);
        return cnt;
    }
    else {
        ll cnt = bin_pow(a , n / 2);
        return cnt * cnt;
    }
}

const int N = (int) 1e6 + 10;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9 + 10;
const ll LLINF = (ll) 1e18 + 10;

/*void brute() {
    for(int i = 0; i < 51; ++i) {
        int ans = 0;
        cout << i << ' ';
        for(int j = 0; j < 51; ++j) {
            if(j == i - (j ^ i)) {
                cout << j << ' ';
                ans++;
            }
        }
        cout << " f" <<ans << endl;
    }
}*/

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

    string s;
    cin >> s;
    sort(all(s));
    cout << s << endl;

    return 0;
}


#include <algorithm>
#include <iostream>
#include <memory.h>
#include <iterator>
#include <cassert>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <bitset>
#include <vector>
#include <cstdio>
#include <string>
#include <queue>
#include <deque>
#include <cmath>
#include <ctime>
#include <stack>
#include <set>
#include <map>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) x.begin() , x.end()

typedef long long ll;
typedef long double ld;
typedef pair < ll , ll > pll;
typedef pair < int , int > pii;

template < typename T >
T read(){
    T p = 1 , x = 0;
    char s = getchar();
    while(s == ' ' || s == '\n') s = getchar();
    if(s == '-') p = -1 , s = getchar();
    while(s >= '0' && s <= '9'){
        x = x * 10 + s - '0';
        s = getchar();
    }
    return x * p;
}

template < typename A , typename B >
void Umax(A &a , const B &b){
    if(a < b)
        a = b;
}

template < typename A , typename B >
void Umin(A &a , const B &b){
    if(a > b){
        a = b;
    }
}

ll bin_pow (ll a , ll n) {
    if(n == 0){
        return 1;
    }
    if(n % 2 == 1){
        ll cnt = a * bin_pow(a , n - 1);
        return cnt;
    }
    else {
        ll cnt = bin_pow(a , n / 2);
        return cnt * cnt;
    }
}

const int N = (int) 1e6 + 10;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9 + 10;
const ll LLINF = (ll) 1e18 + 10;
const int dx [] = { 0 , 0 , 1 , -1 };
const int dy [] = { 1 , -1 , 0 , 0 };

void brute() {
    for(int i = 0; i < 100; ++i) {
        int ans = 0;
        cout << i << ' ';
        for(int j = 0; j < 100; ++j) {
            if(j == i - (j ^ i)) {
                cout << j << ' ';
            }
        }
        cout << endl;
    }
}

map<char, int> a;

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

    int n;
    cin >> n;

    string s;
    cin >> s;

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

    string f = "", r = "";
    for(auto &it : a) {
        int cnt = it.se / 2;
        if(cnt > 0) {
            for(int i = 0; i < cnt; ++i) {
                f += it.fi;
            }
            for(int j = 0; j < cnt; ++j) {
                r += it.fi;
            }
        }
        it.se -= cnt * 2;
    }

   // cout << f << endl;
    reverse(all(r));
    for(auto &it : a) {
        for(int i = 0; i < it.se; ++i) {
            r += it.fi;
        }
    }

    reverse(all(f));
    cout << f << r << endl;

    return 0;
}


#include <bits/stdc++.h>

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")

#define O cout << "BUG is here:)\n";
#define o cerr << "BUG is here:)\n";
#define all(x) x.bg, x.en
//#define int long long
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define rbg rbegin()
#define bg begin()
#define en end()
#define s second
#define f first

using namespace std;

typedef pair < unsigned long long, unsigned long long > puu;
typedef pair < long double, long double > pldb;
typedef pair < long long, long long > pll;
typedef pair < double, double > pdd;
typedef pair < int, int > pii;

typedef unsigned long long ull;
typedef long double ldb;
typedef long long ll;
typedef double db;

const int inf = 1e9, maxn = 1e5 + 213, N = 1e6 + 20, mod = 998244353;
const int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
const db eps = 1e-5, pi = 3.14159265359;
const puu base = mp(1171, 3307);
const ll INF = 1e18;

int n, cnt[50], ans[maxn];
string s;

int main () {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	cin >> n >> s;
	for (int i = 0; i < n; ++i)
		cnt[s[i] - 'a']++;
	memset(ans, -1, sizeof(ans));
	int cur = 0;
	while (1) {
		int x = -1;
		for (int i = 0; i < 26; ++i)
			if ((cnt[i] & 1)) {
				x = i;
				break;
			}

		if (x == -1)
			break;

		cnt[x]--;
		int mx = 0, mx1 = 0;
		for (int i = 0; i < 26; ++i)
			if (cnt[mx] < cnt[i]) {
				mx1 = mx;
				mx = i;
			} else if (cnt[mx1] < cnt[i])
				mx1 = i;

		int y = cnt[mx1] / 2;
		cnt[mx] -= y;
		cnt[mx1] -= y;
		ans[cur + y] = x;
		int xx = cur + y - 1, yy = cur + y + 1;
		for (int i = 0; i < y / 2; ++i) {
			ans[xx--] = mx;
			ans[yy++] = mx;
			ans[xx--] = mx1;
			ans[yy++] = mx1;
		}

		if ((y & 1)) {
			ans[xx--] = mx;
			ans[yy++] = mx;
		}
		cur = yy;
	}

	int cur1 = n - 1;
	while (cur <= cur1) {
		for (int i = 0; i < 26; ++i)
			if (cnt[i] >= 2) {
				ans[cur++] = i;
				ans[cur1--] = i;
				cnt[i] -= 2;
			}
	}

	for (int i = 0; i < n; ++i)
		cout << ((char)(ans[i] + 'a'));
	return 0;
}


#include <bits/stdc++.h>

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")

#define O cout << "BUG is here:)\n";
#define o cerr << "BUG is here:)\n";
#define all(x) x.bg, x.en
//#define int long long
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define rbg rbegin()
#define bg begin()
#define en end()
#define s second
#define f first

using namespace std;

typedef pair < unsigned long long, unsigned long long > puu;
typedef pair < long double, long double > pldb;
typedef pair < long long, long long > pll;
typedef pair < double, double > pdd;
typedef pair < int, int > pii;

typedef unsigned long long ull;
typedef long double ldb;
typedef long long ll;
typedef double db;

const int inf = 1e9, maxn = 1e5 + 213, N = 1e6 + 20, mod = 998244353;
const int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
const db eps = 1e-5, pi = 3.14159265359;
const puu base = mp(1171, 3307);
const ll INF = 1e18;

int n, cnt[50], ans[maxn];
string s;

int main () {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	cin >> n >> s;
	for (int i = 0; i < n; ++i)
		cnt[s[i] - 'a']++;

	int x = -1;
	for (int i = 0; i < 26; ++i)
		if ((cnt[i] & 1))
			x = i;

	int i = n / 2 - 1 , j = n / 2;
	memset(ans, -1, sizeof(ans));
	if (x != -1) {
		ans[n / 2] = x;
		cnt[x]--;
		++j;
	}

	for (int x = 0; x < 26; ++x) {
		for (int y = 0; y < cnt[x] / 2; ++y) {
			ans[i--] = x;
			ans[j++] = x;
//			cerr << i << ' ' << j << endl;
		}
		cnt[x] = (cnt[x] & 1);
	}

	for (int x = 0; x < 26; ++x)
		if (cnt[x])
			for (int j = 0; j < n; ++j)
				if (ans[j] == -1) {
					ans[j] = x;
					break;
				}

	for (int i = 0; i < n; ++i)
		cout << ((char)(ans[i] + 'a'));
	return 0;
}


#include <bits/stdc++.h>

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")

#define O cout << "BUG is here:)\n";
#define o cerr << "BUG is here:)\n";
#define all(x) x.bg, x.en
//#define int long long
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define rbg rbegin()
#define bg begin()
#define en end()
#define s second
#define f first

using namespace std;

typedef pair < unsigned long long, unsigned long long > puu;
typedef pair < long double, long double > pldb;
typedef pair < long long, long long > pll;
typedef pair < double, double > pdd;
typedef pair < int, int > pii;

typedef unsigned long long ull;
typedef long double ldb;
typedef long long ll;
typedef double db;

const int inf = 1e9, maxn = 1e5 + 213, N = 1e6 + 20, mod = 998244353;
const int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
const db eps = 1e-5, pi = 3.14159265359;
const puu base = mp(1171, 3307);
const ll INF = 1e18;

int n, cnt[50], ans[maxn];
string s;

int main () {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	cin >> n >> s;
	for (int i = 0; i < n; ++i)
		cnt[s[i] - 'a']++;

	int x = -1;
	for (int i = 0; i < 26; ++i)
		if ((cnt[i] & 1))
			x = i;

	int i = n / 2 - 1 , j = n / 2;
	memset(ans, -1, sizeof(ans));
	if (x != -1) {
		ans[n / 2] = x;
		cnt[x]--;
		++j;
	}

	bool ok = 1;
	while (i >= 0 && j < n && ok) {
		ok = 0;
		for (int x = 0; x < 26; ++x)
			if (cnt[x] >= 2) {
				ok = 1;
				ans[i--] = x;
				ans[j++] = x;
				cnt[x] -= 2;
			}
	}

	for (int x = 0; x < 26; ++x)
		if (cnt[x])
			for (int j = 0; j < n; ++j)
				if (ans[j] == -1) {
					ans[j] = x;
					break;
				}

	for (int i = 0; i < n; ++i)
		cout << ((char)(ans[i] + 'a'));
	return 0;
}


#include <bits/stdc++.h>

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")

#define O cout << "BUG is here:)\n";
#define o cerr << "BUG is here:)\n";
#define all(x) x.bg, x.en
//#define int long long
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define rbg rbegin()
#define bg begin()
#define en end()
#define s second
#define f first

using namespace std;

typedef pair < unsigned long long, unsigned long long > puu;
typedef pair < long double, long double > pldb;
typedef pair < long long, long long > pll;
typedef pair < double, double > pdd;
typedef pair < int, int > pii;

typedef unsigned long long ull;
typedef long double ldb;
typedef long long ll;
typedef double db;

const int inf = 1e9, maxn = 1e5 + 213, N = 1e6 + 20, mod = 998244353;
const int dx[] = {0, -1, 1, 0}, dy[] = {1, 0, 0, -1};
const db eps = 1e-5, pi = 3.14159265359;
const puu base = mp(1171, 3307);
const ll INF = 1e18;

int n;
string s;

int main () {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	cin >> n >> s;
	sort(all(s));
	cout << s << endl;
	return 0;
}


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

#define pb  push_back
#define mp  make_pair
#define ll  long long
#define itr iterator

typedef pair<ll,ll> pii;

const ll MAX=1e5;
const ll INF=1e12;

string X,res,other;

int N,ok,len,fre[26];

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

	ok=-1;
	cin>>N;
	cin>>X;
	for(int A=0;A<X.size();A++)
		fre[X[A]-'a']++;
	for(int A=0;A<X.size();A++)
	{
		if(fre[X[A]-'a']%2==1 and ok==-1)
			ok=A,fre[X[A]-'a']--;
		else if(fre[X[A]-'a']%2==1)
			res+=X[A],fre[X[A]-'a']--;
	}
	for(int A=0;A<X.size();)
	{
		if(fre[X[A]-'a']==0)
		{
			A++;
			continue;
		}
		fre[X[A]-'a']--;
		fre[X[A]-'a']--;
		res+=X[A];
		other+=X[A];
	}
	reverse(other.begin(),other.end());
	if(ok==-1)
		res=res+other;
	else
		res=res+(char)(ok+'a')+other;
	cout<<res;
	return 0;
}


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

#define pb  push_back
#define mp  make_pair
#define ll  long long
#define itr iterator

typedef pair<ll,ll> pii;

const ll MAX=1e5;
const ll INF=1e12;

string X,res,other;

int N,ok,len,fre[26];

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

	ok=-1;
	cin>>N;
	cin>>X;
	for(int A=0;A<X.size();A++)
		fre[X[A]-'a']++;
	for(int A=0;A<X.size();A++)
	{
		if(fre[X[A]-'a']%2==1 and ok==-1)
			ok=X[A]-'a',fre[X[A]-'a']--;
		else if(fre[X[A]-'a']%2==1)
			res+=X[A],fre[X[A]-'a']--;
	}
	for(int A=0;A<X.size();)
	{
		if(fre[X[A]-'a']==0)
		{
			A++;
			continue;
		}
		fre[X[A]-'a']--;
		fre[X[A]-'a']--;
		res+=X[A];
		other+=X[A];
	}
	reverse(other.begin(),other.end());
	if(ok==-1)
		res=res+other;
	else
		res=res+(char)(ok+'a')+other;
	cout<<res;
	return 0;
}


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

#define pb  push_back
#define mp  make_pair
#define ll  long long
#define itr iterator

typedef pair<ll,ll> pii;

const ll MAX=1e5;
const ll INF=1e12;

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

	int N;
	string X;
	cin>>N;
	cin>>X;
	sort(X.begin(),X.end());
	cout<<X;
	return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int         long long
#define mod         1000000007
#define FAST        ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f(i,n)      for(int i=0;i<n;i++)
#define fp(i,k,n)   for(int i=k;i<=n;i++)
#define fr(i,k,n)   for(int i=k;i>=n;i--)
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define dbg(x)      cout << (#x) << " is " << (x) << '\n'
#define F           first
#define S           second
#define sz(x)       (int)(x).size()
#define lb          lower_bound
#define ub          upper_bound
#define mems(x)     memset(x,0,sizeof(x))
#define all(a)      a.begin(),a.end()
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

/*---------------------------------------------------------------------------------------------------*/

void solve()
{
  int n;
  cin >> n;
  string s;
  cin >> s;
  vii v;
  int c[26]={0};
  f(i,n)
    c[s[i]-'a']++;
  f(i,26)
    v.pb({c[i],i});
  sort(all(v),greater<>());
  string r;
//   r="";
  while(v[0].F!=0)
  {
      int cnt1=v[0].F,cnt2=v[1].F;
     if(cnt2==0)
     {
        while(cnt1)
            {r.pb(v[0].S+'a');cnt1--;}
        v[0].F=cnt1;
     }
     else
     {
         int flg=0;
         while(cnt2)
         {
             if(flg&1)
                {r.pb(v[1].S+'a');cnt2--;}
             else
                {r.pb(v[0].S+'a');cnt1--;}
            flg^=1;
         }
         v[0].F=cnt1;
         v[1].F=cnt2;
     }
     sort(all(v),greater<>());
  }
  cout << r << '\n';
  return;
}

signed main()
{
  FAST
  int T=1;
  // cin >> T;
  while(T--)
  {
    solve();
  }
  return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int         long long
#define mod         1000000007
#define FAST        ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f(i,n)      for(int i=0;i<n;i++)
#define fp(i,k,n)   for(int i=k;i<=n;i++)
#define fr(i,k,n)   for(int i=k;i>=n;i--)
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define dbg(x)      cout << (#x) << " is " << (x) << '\n'
#define F           first
#define S           second
#define sz(x)       (int)(x).size()
#define lb          lower_bound
#define ub          upper_bound
#define mems(x)     memset(x,0,sizeof(x))
#define all(a)      a.begin(),a.end()
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

/*---------------------------------------------------------------------------------------------------*/

void solve()
{
  int n;
  cin >> n;
  string s;
  cin >> s;
  vii v;
  int c[26]={0};
  f(i,n)
    c[s[i]-'a']++;
  f(i,26)
    v.pb({c[i],i});
  sort(all(v),greater<>());
  string r;
//   r="";
  for(auto x:v)
  {
    f(i,x.F)
      cout << char((x.S+'a'));
  }
  cout << '\n';
  return;
}

signed main()
{
  FAST
  int T=1;
  // cin >> T;
  while(T--)
  {
    solve();
  }
  return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int         long long
#define mod         1000000007
#define FAST        ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define f(i,n)      for(int i=0;i<n;i++)
#define fp(i,k,n)   for(int i=k;i<=n;i++)
#define fr(i,k,n)   for(int i=k;i>=n;i--)
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define dbg(x)      cout << (#x) << " is " << (x) << '\n'
#define F           first
#define S           second
#define sz(x)       (int)(x).size()
#define lb          lower_bound
#define ub          upper_bound
#define mems(x)     memset(x,0,sizeof(x))
#define all(a)      a.begin(),a.end()
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

/*---------------------------------------------------------------------------------------------------*/

void solve()
{
  int n;
  cin >> n;
  string s;
  cin >> s;
  vii v;
  int c[26]={0};
  f(i,n)
    c[s[i]-'a']++;
  f(i,26)
    v.pb({c[i],i});
  sort(all(v),greater<>());
  string r;
//   r="";
  while(v[0].F!=0)
  {
      int cnt1=v[0].F,cnt2=v[1].F;
     if(cnt2==0)
     {
        while(cnt1)
            {r.pb(v[0].S+'a');cnt1--;}
        v[0].F=cnt1;
     }
     else
     {
         int flg=0;
         while(cnt2)
         {
             if(flg&1)
                {r.pb(v[1].S+'a');cnt2--;}
             else
                {r.pb(v[0].S+'a');cnt1--;}
            flg^=1;
         }
         if(cnt1)
          {r.pb(v[0].S+'a');cnt1--;}
         v[0].F=cnt1;
         v[1].F=cnt2;
     }
     sort(all(v),greater<>());
  }
  cout << r << '\n';
  return;
}

signed main()
{
  FAST
  int T=1;
  // cin >> T;
  while(T--)
  {
    solve();
  }
  return 0;
}


#include<bits/stdc++.h>
#define F first
#define S second
#define int_maxm 2147483647
#define mod 1000000007
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define endl '\n'
using namespace std;
ll fact[200003];
ll gcd(ll a,ll b)
{
	ll x = max(a,b);
	ll y = min(a,b);
	if(x%y == 0)return y;
	return gcd(y,x%y);
}
void init()
{
	fact[0] = 1;
	for(int i=1;i<200003;i++)
	{
		fact[i] = (fact[i-1]*i)%mod;
	}
}
ll modpow(ll x, ll n)
{
	if(n == 0)return 1;
	ll v = ((x%mod)*(x%mod))%mod;
	if(n%2 == 0)return modpow(v,n/2);
	return (x*modpow(v,(n-1)/2))%mod;
}
ll invmod(ll a)
{
	return modpow(a,mod-2);
}
ll ncr(ll n , ll r)
{
	return (((fact[n]*invmod(fact[r]))%mod)*invmod(fact[n-r]))%mod;
}

ll l , n , k ,q ,o,r,x;
int ans[33] ;
int a[100005] ;
class node{
	public  : ll data[32] ;
	int left,  right;
	node* llink ;
	node* rlink ;
};

void conv(ll* a, int x)
{
	int i = 0;
	while(x > 0)
	{
		a[i++] = x%2;
		x /= 2;
	}
}
void joinChild(ll* ans, ll* a,ll* b)
{
	for(int i=0;i<32;i++)
	{
		ans[i] = a[i] + b[i] ;
	}
}
node* create(int l , int r)
{
	node* nnode = new node() ;
	nnode->left = l ;
	nnode->right = r;
	if(l == r)
	{
		nnode->llink = NULL;
		nnode->rlink = NULL;
		conv(nnode->data , a[l]);
		return nnode ;
	}
	int m = (l+r)/2 ;
	nnode->llink = create(l , m);
	nnode->rlink = create(m+1 , r);
	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data);
	return nnode ;
}

node* root ;

void query(node* nnode , int l , int r)
{
	if(l > nnode->right || nnode->left > r)return ;
	else if( l <= nnode->left && r >= nnode->right)
	{
		for(int i=0;i<32;i++)
			ans[i] += nnode->data[i] ;
		return ;
	}
	query(nnode->llink , l,r);
	query(nnode->rlink , l ,r);
}

void update(node* nnode,int k,int x)
{
	if(k < nnode->left || k > nnode->right)return ;
	if(nnode->left == nnode->right)
	{
		conv(nnode->data , k);return ;
	}
	update(nnode->llink , k,x);
	update(nnode->rlink , k,x);

	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data );

}
long long int solve1()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 1)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}
long long int solve2()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 0)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}

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

	cin >> n;
	string s;
	cin >> s;
	int fre[26] = {0};
	for(int i =0;i<n;i++)
		fre[s[i]-'a']++;
	char v[100005] ;
	if(n%2 == 1)
	{
		int i = n/2 ;
		for(int k=0;k<26;k++)
		{
			if(fre[k]%2 == 1)
			{
				v[i]=  k+'a';
				fre[k]--;
				break;
			}
		}
		int  j =i+1 ;i--;

		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  > 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}
	else
	{
		int i = n/2 , j =i+1 ;
		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  >= 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}

	for(int i=0;i<n;i++)
		cout << v[i];
}


#include<bits/stdc++.h>
#define F first
#define S second
#define int_maxm 2147483647
#define mod 1000000007
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define endl '\n'
using namespace std;
ll fact[200003];
ll gcd(ll a,ll b)
{
	ll x = max(a,b);
	ll y = min(a,b);
	if(x%y == 0)return y;
	return gcd(y,x%y);
}
void init()
{
	fact[0] = 1;
	for(int i=1;i<200003;i++)
	{
		fact[i] = (fact[i-1]*i)%mod;
	}
}
ll modpow(ll x, ll n)
{
	if(n == 0)return 1;
	ll v = ((x%mod)*(x%mod))%mod;
	if(n%2 == 0)return modpow(v,n/2);
	return (x*modpow(v,(n-1)/2))%mod;
}
ll invmod(ll a)
{
	return modpow(a,mod-2);
}
ll ncr(ll n , ll r)
{
	return (((fact[n]*invmod(fact[r]))%mod)*invmod(fact[n-r]))%mod;
}

ll l , n , k ,q ,o,r,x;
int ans[33] ;
int a[100005] ;
class node{
	public  : ll data[32] ;
	int left,  right;
	node* llink ;
	node* rlink ;
};

void conv(ll* a, int x)
{
	int i = 0;
	while(x > 0)
	{
		a[i++] = x%2;
		x /= 2;
	}
}
void joinChild(ll* ans, ll* a,ll* b)
{
	for(int i=0;i<32;i++)
	{
		ans[i] = a[i] + b[i] ;
	}
}
node* create(int l , int r)
{
	node* nnode = new node() ;
	nnode->left = l ;
	nnode->right = r;
	if(l == r)
	{
		nnode->llink = NULL;
		nnode->rlink = NULL;
		conv(nnode->data , a[l]);
		return nnode ;
	}
	int m = (l+r)/2 ;
	nnode->llink = create(l , m);
	nnode->rlink = create(m+1 , r);
	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data);
	return nnode ;
}

node* root ;

void query(node* nnode , int l , int r)
{
	if(l > nnode->right || nnode->left > r)return ;
	else if( l <= nnode->left && r >= nnode->right)
	{
		for(int i=0;i<32;i++)
			ans[i] += nnode->data[i] ;
		return ;
	}
	query(nnode->llink , l,r);
	query(nnode->rlink , l ,r);
}

void update(node* nnode,int k,int x)
{
	if(k < nnode->left || k > nnode->right)return ;
	if(nnode->left == nnode->right)
	{
		conv(nnode->data , k);return ;
	}
	update(nnode->llink , k,x);
	update(nnode->rlink , k,x);

	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data );

}
long long int solve1()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 1)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}
long long int solve2()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 0)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}

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

	cin >> n;
	string s;
	cin >> s;
	int fre[26] = {0};
	for(int i =0;i<n;i++)
		fre[s[i]-'a']++;
	char v[100005] ;
	if(n%2 == 1)
	{
		int i = n/2 ;
		for(int k=0;k<26;k++)
		{
			if(fre[k]%2 == 1)
			{
				v[i]=  k+'a';
				fre[k]--;
				break;
			}
		}
		int  j =i+1 ;i--;

		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  >= 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}
	else
	{
		int i = n/2 , j =i+1 ;
		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  >= 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}

	for(int i=0;i<n;i++)
		cout << v[i];
}


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

int n,fre[26];
string s;
int main()
{
	cin >> n;
	cin >> s;

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

	for(int i=0;i<26;i++)
	{
		// cout << fre[i] << endl;
		while(fre[i])
		{
			cout << (char)('a'+i) ;
			fre[i]--;
		}
	}
}


#include<bits/stdc++.h>
#define F first
#define S second
#define int_maxm 2147483647
#define mod 1000000007
#define ll long long int
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define endl '\n'
using namespace std;
ll fact[200003];
ll gcd(ll a,ll b)
{
	ll x = max(a,b);
	ll y = min(a,b);
	if(x%y == 0)return y;
	return gcd(y,x%y);
}
void init()
{
	fact[0] = 1;
	for(int i=1;i<200003;i++)
	{
		fact[i] = (fact[i-1]*i)%mod;
	}
}
ll modpow(ll x, ll n)
{
	if(n == 0)return 1;
	ll v = ((x%mod)*(x%mod))%mod;
	if(n%2 == 0)return modpow(v,n/2);
	return (x*modpow(v,(n-1)/2))%mod;
}
ll invmod(ll a)
{
	return modpow(a,mod-2);
}
ll ncr(ll n , ll r)
{
	return (((fact[n]*invmod(fact[r]))%mod)*invmod(fact[n-r]))%mod;
}

ll l , n , k ,q ,o,r,x;
int ans[33] ;
int a[100005] ;
class node{
	public  : ll data[32] ;
	int left,  right;
	node* llink ;
	node* rlink ;
};

void conv(ll* a, int x)
{
	int i = 0;
	while(x > 0)
	{
		a[i++] = x%2;
		x /= 2;
	}
}
void joinChild(ll* ans, ll* a,ll* b)
{
	for(int i=0;i<32;i++)
	{
		ans[i] = a[i] + b[i] ;
	}
}
node* create(int l , int r)
{
	node* nnode = new node() ;
	nnode->left = l ;
	nnode->right = r;
	if(l == r)
	{
		nnode->llink = NULL;
		nnode->rlink = NULL;
		conv(nnode->data , a[l]);
		return nnode ;
	}
	int m = (l+r)/2 ;
	nnode->llink = create(l , m);
	nnode->rlink = create(m+1 , r);
	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data);
	return nnode ;
}

node* root ;

void query(node* nnode , int l , int r)
{
	if(l > nnode->right || nnode->left > r)return ;
	else if( l <= nnode->left && r >= nnode->right)
	{
		for(int i=0;i<32;i++)
			ans[i] += nnode->data[i] ;
		return ;
	}
	query(nnode->llink , l,r);
	query(nnode->rlink , l ,r);
}

void update(node* nnode,int k,int x)
{
	if(k < nnode->left || k > nnode->right)return ;
	if(nnode->left == nnode->right)
	{
		conv(nnode->data , k);return ;
	}
	update(nnode->llink , k,x);
	update(nnode->rlink , k,x);

	joinChild(nnode->data , nnode->rlink->data , nnode->llink->data );

}
long long int solve1()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 1)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}
long long int solve2()
{
	ll ret = 0;
	for(int i=0;i<32;i++)
	{
		if(x%2 == 0)
		{
			ret += modpow(2,i)*ans[i] ;
		}
		x /= 2 ;
	}
	return ret ;
}

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

	cin >> n;
	string s;
	cin >> s;
	int fre[26] = {0};
	for(int i =0;i<n;i++)
		fre[s[i]-'a']++;
	char v[100005] ;
	if(n%2 == 1)
	{
		int i = n/2 ;
		for(int k=0;k<26;k++)
		{
			if(fre[k]%2 == 1)
			{
				v[i]=  k+'a';
				fre[k]--;
				break;
			}
		}
		int  j =i+1 ;i--;

		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  > 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}
	else
	{
		int i = n/2 , j =i+1 ;
		int c = 0;int u = 0;
		for(int k=0;k<26;k++)
		{
			while(fre[k]  > 2)
			{
				v[i] = 'a'+k;
				v[j] =v[i] ;
				i--;j++;
				fre[k] -= 2;
				u = 0;
			}
		}

		for(int k =0 ;k<26 && i >= 0;k++)
		{
			if(fre[k]){v[i] = k+'a';fre[k]--;i--;}
		}
		for(int k=0;k<26;k++)
		{
			if(fre[k])
			{
				v[j] = k+'a';fre[k]--;j++;
			}
		}
	}

	for(int i=0;i<n;i++)
		cout << v[i];
}


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

int main() {
	unordered_map<char,int> cnt;
	vector<char> v;
	string s;
	int n;
	cin>>n;
	cin>>s;
	for(int i=0;i<s.size();i++){
		v.push_back(s[i]);
	}
	vector<pair<int,char>> all;
	for(char i='a';i<='z';i++){
		for(int j=0;j<v.size();j++){
				if(v[j]==i){
					cnt[i]++;
				}
		}
		if(cnt[i]!=0){
			all.push_back({cnt[i],i});
		}
	}
	sort(all.begin(),all.end());

	for(int i=all.size()-1;i>=0;i-=2){
		if(i==0){
			for(int j=0;j<all[i].first;j++){
				cout<<all[i].second;
			}
		}else{
			string ss="";
			ss+=all[i].second;
			ss+=all[i-1].second;
			for(int j=0;j<min(all[i].first,all[i-1].first);j++){
				cout<<ss;
			}
			for(int j=0;j<all[i].first-all[i-1].first;j++){
				cout<<all[i].second;
			}
		}
	}

	// your code goes here
	return 0;
}


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

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


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

main() {
	int n;
	cin>>n;
	string s;
	cin>>s;
	vector<char> v;
	unordered_map<char,int> cnt;
	for(int i=0;i<n;i++){
		if(!cnt[s[i]]){
			v.push_back(s[i]);
		}
		cnt[s[i]]++;
	}
	vector< pair<int,char> > all;
	for(int i=0;i<v.size();i++){
		all.push_back({cnt[v[i]],v[i]});
	}
	int i=all.size()-1;
	while(1){
		sort(all.begin(),all.end());
		int x=all[i].first;

		if( all.size()>=2 &&all[i-1].first>0&& x!=0){
		string ss;
		ss+=all[i].second;
		ss+=all[i-1].second;
		for(int k=0;k<min(all[i].first,all[i-1].first);k++){
			cout<<ss;
		}
		for(int k=0;k<all[i].first-min(all[i].first,all[i-1].first) ;k++){
			cout<<all[i].second;
		}
		all[i-1].first=0;
		all[i].first=0;
		}else{
			break;
		}
	}
	sort(all.begin(),all.end());
	for(int i=0;i<all[all.size()-1].first;i++){
		cout<<all[all.size()-1].second;
	//	cout<<"hi ";
	}

	// your code goes here
	return 0;
}


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

main() {
	int n;
	cin>>n;
	string s;
	cin>>s;
	vector<char> v;
	unordered_map<char,int> cnt;
	for(int i=0;i<n;i++){
		if(!cnt[s[i]]){
			v.push_back(s[i]);
		}
		cnt[s[i]]++;
	}
	vector< pair<int,char> > all;
	for(int i=0;i<v.size();i++){
		all.push_back({cnt[v[i]],v[i]});
	}
	int i=all.size()-1;
	while(1){
		sort(all.begin(),all.end());
		int x=all[i].first;

		if( all.size()>=2 &&all[i-1].first>0&& x!=0){
		string ss;
		ss+=all[i].second;
		ss+=all[i-1].second;
		for(int k=0;k<min(all[i].first,all[i-1].first);k++){
			cout<<ss;
		}
		for(int k=0;k<all[i].first-min(all[i].first,all[i-1].first) ;k++){
			cout<<all[i].second;
		}
		all[i-1].first=0;
		all[i].first=0;
		}else{
			break;
		}
	}
	sort(all.begin(),all.end());
	for(int i=1;i<all[all.size()-1].first;i++){
		cout<<all[all.size()-1].second;
	//	cout<<"hi ";
	}

	// your code goes here
	return 0;
}


#include <iostream>
#include<bits/stdc++.h>
using namespace std;
#define int long long

main() {
	unordered_map<char,int> cnt;
	vector<char> v;
	string s;
	int n;
	cin>>n;
	cin>>s;
	for(int i=0;i<s.size();i++){
		v.push_back(s[i]);
	}
	vector<pair<int,char>> all;
	for(char i='a';i<='z';i++){
		for(int j=0;j<v.size();j++){
				if(v[j]==i){
					cnt[i]++;
				}
		}
		if(cnt[i]!=0){
			all.push_back({cnt[i],i});
		}
	}
	sort(all.begin(),all.end());

	for(int i=all.size()-1;i>=0;i-=2){
		if(i==0){
			for(int j=0;j<all[i].first;j++){
				cout<<all[i].second;
			}
		}else{
			string ss="";
			ss+=all[i].second;
			ss+=all[i-1].second;
			for(int j=0;j<min(all[i].first,all[i-1].first);j++){
				cout<<ss;
			}
			for(int j=0;j<all[i].first-all[i-1].first;j++){
				cout<<all[i].second;
			}
		}
	}

	// your code goes here
	return 0;
}


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

main() {
	int n;
	cin>>n;
	string s;
	cin>>s;
	vector<char> v;
	unordered_map<char,int> cnt;
	for(int i=0;i<n;i++){
		if(!cnt[s[i]]){
			v.push_back(s[i]);
		}
		cnt[s[i]]++;
	}
	vector< pair<int,char> > all;
	for(int i=0;i<v.size();i++){
		all.push_back({cnt[v[i]],v[i]});
	}
	sort(all.begin(),all.end());
	for(int i=0;i<all.size()-1;i++){
		int x=all[i].first;
		if(x!=0){
		string ss;
		ss+=all[i+1].second;
		ss+=all[i].second;
		for(int i=0;i<x;i++){
			cout<<ss;
		}
		all[i+1].first-=all[i].first;
		}
	}
	for(int i=0;i<all[all.size()-1].first;i++){
		cout<<all[all.size()-1].second;
	}

	// your code goes here
	return 0;
}


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

main() {
	int n;
	cin>>n;
	string s;
	cin>>s;
	vector<char> v;
	unordered_map<char,int> cnt;
	for(int i=0;i<n;i++){
		if(!cnt[s[i]]){
			v.push_back(s[i]);
		}
		cnt[s[i]]++;
	}
	vector< pair<int,char> > all;
	for(int i=0;i<v.size();i++){
		all.push_back({cnt[v[i]],v[i]});
	}
	int i=all.size()-1;
	while(1){
		sort(all.begin(),all.end());
		int x=all[i].first;

		if( all.size()>=2 &&all[i-1].first>0&& x!=0){
		string ss;
		ss+=all[i].second;
		ss+=all[i-1].second;
		for(int k=0;k<min(all[i].first,all[i-1].first);k++){
			cout<<ss;
		}
		if(all[i].first-all[i-1].first==1){
			cout<<all[i].second;
			all[i-1].first=0;
			all[i].first=0;
		}
		else{
			all[i].first-=all[i-1].first;
			all[i-1].first=0;
		}
		}else{
			break;
		}
	}
	sort(all.begin(),all.end());
	for(int i=0;i<all[all.size()-1].first;i++){
		cout<<all[all.size()-1].second;
	//	cout<<"hi ";
	}

	// your code goes here
	return 0;
}


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

main() {
	int n;
	cin>>n;
	string s;
	cin>>s;
	vector<char> v;
	unordered_map<char,int> cnt;
	for(int i=0;i<n;i++){
		if(!cnt[s[i]]){
			v.push_back(s[i]);
		}
		cnt[s[i]]++;
	}
	vector< pair<int,char> > all;
	for(int i=0;i<v.size();i++){
		all.push_back({cnt[v[i]],v[i]});
	}
	sort(all.begin(),all.end());
	for(int i=0;i<all.size()-1;i++){
		int x=all[i].first;
		if(x!=0){
		string ss;
		ss+=all[i].second;
		ss+=all[i+1].second;
		for(int i=0;i<x;i++){
			cout<<ss;
		}
		all[i+1].first-=all[i].first;
		}
	}
	for(int i=0;i<all[all.size()-1].first;i++){
		cout<<all[all.size()-1].second;
	}

	// your code goes here
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define vsort(v) sort(v.begin(),v.end())
#define asort(arr,n) sort(arr,arr+n)
#define pb(a) push_back(a)
#define mpp(i,j) make_pair(i,j)
#define f first
#define ss second
#define rep(i,l,n) for(i=l;i<n;i++)
#define chk cout<<"YES";
#define input freopen("new.txt","r",stdin)
#define amin(arr,n) *min_element(arr,arr+n)
#define amax(arr,n) *max_element(arr,arr+n)
#define MOD 1000000007
using namespace std;
int main()
{
	ll i,j,k,t,l,n,m,x,y,z,t1,t2,t3,idx,flag=1;
	cin>>n;
	string ch;
	cin>>ch;
	ll arr[26]={0};
	for(i=0;i<n;i++)
	{
		arr[ch[i]-97]++;
	}
	for(i=0;i<26;i++)
	{
		k=arr[i];
		while(k--)
		{
			cout<<(char)(i+97);
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll unsigned long long
#define vsort(v) sort(v.begin(),v.end())
#define asort(arr,n) sort(arr,arr+n)
#define pb(a) push_back(a)
#define mpp(i,j) make_pair(i,j)
#define f first
#define ss second
#define rep(i,l,n) for(i=l;i<n;i++)
#define chk cout<<"YES";
#define input freopen("new.txt","r",stdin)
#define amin(arr,n) *min_element(arr,arr+n)
#define amax(arr,n) *max_element(arr,arr+n)
#define MOD 1000000007
using namespace std;
int main()
{
	ll i,j,k,t,l,n,m,a,b,c;
	cin>>n;
	string ch,ans;
	cin>>ch;
	ll arr[26]={0};
	deque<char> q;
	for(i=0;i<ch.length();i++)
	{
		arr[ch[i]-97]++;
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]&1)
		{
			char z=i+97;
			k=arr[i];
			while(k--)
			{
				q.push_back(z);
			}
			arr[i]=-1;
			break;
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]%2==0)
		{
			k=arr[i];
			while(k>0)
			{
				char z=i+97;
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
			arr[i]=-1;
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]&1)
		{
			k=arr[i];
			while(k>1)
			{
				char z=i+97;
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
			arr[i]=1;
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]==1)
		{
			char z=i+97;
			q.push_back(z);
		}
	}
	while(!q.empty())
	{
		char z=q.front();
		q.pop_front();
		ans.push_back(z);
	}
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
#define ll unsigned long long
#define vsort(v) sort(v.begin(),v.end())
#define asort(arr,n) sort(arr,arr+n)
#define pb(a) push_back(a)
#define mpp(i,j) make_pair(i,j)
#define f first
#define ss second
#define rep(i,l,n) for(i=l;i<n;i++)
#define chk cout<<"YES";
#define input freopen("new.txt","r",stdin)
#define amin(arr,n) *min_element(arr,arr+n)
#define amax(arr,n) *max_element(arr,arr+n)
#define MOD 1000000007
using namespace std;
int main()
{
	ll i,j,k,t,l,n,m,a,b,c;
	cin>>n;
	string ch,ans;
	cin>>ch;
	ll arr[26]={0};
	deque<char> q;
	for(i=0;i<ch.length();i++)
	{
		arr[ch[i]-97]++;
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]&1)
		{
			char z=i+97;
			k=arr[i];
			while(k--)
			{
				q.push_back(z);
			}
			arr[i]=-1;
			break;
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]%2==0)
		{
			k=arr[i];
			while(k>0)
			{
				char z=i+97;
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]&1)
		{
			k=arr[i];
			while(k>1)
			{
				char z=i+97;
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
		}
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]==-1)
		continue;
		if(arr[i]==1)
		{
			char z=i+97;
			q.push_back(z);
		}
	}
	while(!q.empty())
	{
		char z=q.front();
		q.pop_front();
		ans.push_back(z);
	}
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define vsort(v) sort(v.begin(),v.end())
#define asort(arr,n) sort(arr,arr+n)
#define pb(a) push_back(a)
#define mpp(i,j) make_pair(i,j)
#define f first
#define ss second
#define rep(i,l,n) for(i=l;i<n;i++)
#define chk cout<<"YES";
#define input freopen("new.txt","r",stdin)
#define amin(arr,n) *min_element(arr,arr+n)
#define amax(arr,n) *max_element(arr,arr+n)
#define MOD 1000000007
using namespace std;
int main()
{
	ll i,j,k,t,l,n,m,a,b,c;
	cin>>n;
	string ch,ans;
	cin>>ch;
	ll arr[26]={0};
	deque<char> q;
	priority_queue< pair<ll,ll > > q1,q2;
	for(i=0;i<ch.length();i++)
	{
		arr[ch[i]-97]++;
	}
	for(i=0;i<26;i++)
	{
		if(arr[i]&1)
		q1.push(make_pair(arr[i],i));
		else
		q2.push(make_pair(arr[i],i));
	}
	while(!q1.empty())
	{
		a=q1.top().ss;
		q1.pop();
		k=arr[a];
		char z=a+97;
		while(k--)
		{
			q.push_back(z);
		}
		if(!q2.empty())
		{
			a=q2.top().ss;
			q2.pop();
			k=arr[a];
			z=a+97;
			while(k>0)
			{
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
		}
		string temp;
		temp.clear();
		while(!q.empty())
		{
			z=q.front();
			q.pop_front();
			temp.push_back(z);
		}
		ans+=temp;
	}
	while(!q2.empty())
	{
			a=q2.top().ss;
			q2.pop();
			k=arr[a];
			char z=a+97;
			while(k>0)
			{
				q.push_back(z);
				q.push_front(z);
				k-=2;
			}
			string temp;
		temp.clear();
		while(!q.empty())
		{
			z=q.front();
			q.pop_front();
			temp.push_back(z);
		}
		ans+=temp;
	}
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s;
    cin>>s;
    int a[26]={0};
    int ind=-1,max=0;
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    for(int i=0;i<26;i++)
        for(int j=0;j<a[i];j++)
            cout<<(char)(i+97);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s,s2="";
    cin>>s;
    char a[26]={0};
    int ind=-1,max=0;
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    for(int i=0;i<26;i++)
        if(a[i]>max)
        {
            ind=i;
            max=a[i];
        }
    for(int i=0;i<26;i++)
        if(a[i]>1&&i!=ind)
        {
            for(int j=0;j<a[i]/2;j++)
            {
                cout<<(char)(i+97);
                s2=s2+(char)(i+97);
            }
        }
    while(a[ind])
    {
        cout<<(char)(ind+97);
        a[ind]--;
    }
    for(int i=0;i<s2.length();i++)
        cout<<s2[s2.length()-1-i];
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
            cout<<(char)(i+97);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s,s2="";
    cin>>s;
    char a[26]={0};
    int ind=-1,max=0;
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    for(int i=0;i<26;i++)
        if(a[i]>max)
        {
            ind=i;
            max=a[i];
        }
    for(int i=0;i<26;i++)
        if(a[i]>1&&i!=ind&&a[i]%2==0)
        {
            for(int j=0;j<a[i]/2;j++)
            {
                cout<<(char)(i+97);
                s2=s2+(char)(i+97);
            }
        }
    while(a[ind])
    {
        cout<<(char)(ind+97);
        a[ind]--;
    }
    for(int i=0;i<s2.length();i++)
        cout<<s2[s2.length()-1-i];
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
        {
            while(a[i])
            {
                a[i]--;
                cout<<(char)(i+97);
            }
        }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s,s2="";
    cin>>s;
    char a[26]={0};
    int ind=-1,max=0;
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    for(int i=0;i<26;i++)
        for(int j=0;j<a[i];j++)
            cout<<(char)(i+97);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s,s2="";
    cin>>s;
    char a[26]={0};
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    int ind=-1;
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
        {
            ind=i;
            a[i]--;
            break;
        }
    for(int i=0;i<26;i++)
        if(a[i]>1)
        {
            for(int j=0;j<a[i]/2;j++)
            {
                cout<<(char)(i+97);
                s2=s2+(char)(i+97);
            }
        }
    if(ind!=-1)
        cout<<(char)(ind+97);
    for(int i=0;i<s2.length();i++)
        cout<<s2[s2.length()-1-i];
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
            cout<<(char)(i+97);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define int long long
const int N=1e6+5;
ll max(ll a,ll b)
{
    if(a>=b)
        return a;
    else
        return b;
}
ll min(ll a,ll b)
{
    if(a>=b)
        return b;
    else
        return a;
}
ll diff(ll a,ll b)
{
    if(a>=b)
        return a-b;
    else
        return b-a;
}
ll mod(ll a)
{
    if(a>=0)
        return a;
    else
        return -a;
}
void pairsort(ll a[], ll b[], ll n)
{
    pair<ll, ll> pairt[n];

    for (int i = 0; i < n; i++)
    {
        pairt[i].first = a[i];
        pairt[i].second = b[i];
    }

    sort(pairt, pairt + n);

    for (int i = 0; i < n; i++)
    {
        a[i] = pairt[i].first;
        b[i] = pairt[i].second;
    }
}
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
ll rev(ll n)
{
    ll ans=0;
    while(n)
    {
        ans=ans*10+n%10;
        n=n/10;
    }
    return ans;
}
ll fact(ll n)
{
    if(n==0)
        return 1;
    if(n==1)
        return 1;
    if(n>=2)
        return n*fact(n-1);
}
int isPrime(int n)
{
    for(int i=2;i*i<=n;i++)
        if(n%i==0)
            return 0;
    return 1;
}
int32_t main()
{
    IOS;
    int n;
    cin>>n;
    string s,s2="";
    cin>>s;
    char a[26]={0};
    for(int i=0;i<n;i++)
        a[(int)s[i]-97]++;
    int ind=-1;
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
        {
            ind=i;
            a[i]--;
            break;
        }
    for(int i=0;i<26;i++)
        if(a[i]>1)
        {
            for(int j=0;j<a[i]/2;j++)
            {
                cout<<(char)(i+97);
                s2=s2+(char)(i+97);
            }
        }
    if(ind!=-1)
        cout<<(char)(ind+97);
    for(int i=0;i<s2.length();i++)
        cout<<s2[s2.length()-1-i];
    for(int i=0;i<26;i++)
        if(a[i]%2==1)
            cout<<(char)(i+97);
    return 0;
}

[close]


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ROF(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define OO ((1LL << 31) - 1)
#define eps 1e-12
#define in(a, b) ((b).find(a) != (b).end())
#define sgn(a) ((a) > eps ? 1 : ((a) < -eps ? -1 : 0))
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
template <typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using max_heap = priority_queue<T>;

int cnt[26] = {0};

void printPal(int len, char a, char b){
    if (len > 1){
        cout << a;
        printPal(len - 2, b, a);
        cout << a;
    } else if (len == 1){
        cout << a;
    } else {
        return;
    }
}

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    int n, i, j, k;
    string s;
    cin >> n >> s;
    for (i = 0; i < n; i++){
        cnt[(int)(s[i] - 'a')]++;
    }
    vector<pi> c;
    for (i = 0; i < 26; i++){
        if (cnt[i] > 0){
            c.PB({cnt[i], i});
        }
    }
    sort(c.rbegin(), c.rend());
    j = 1;
    n = c.size();
    for (i = 0; i < n;){
        if (c[i].F > 0){
            while ((i == j) || (j < n && c[j].F <= 0)){
                j++;
            }
            if (j == n){
                for (; c[i].F > 0; c[i].F--){
                    cout << (char)(c[i].S + 'a');
                }
            } else {
                int mini = min(c[i].F, c[j].F);
                if (c[i].F == c[j].F){
                    if (mini == 1) cout << (char)(c[i].S + 'a') << (char)(c[j].S + 'a');
                    else printPal(2 * mini, c[i].S + 'a', c[j].S + 'a');
                    c[i].F -= mini, c[j].F -= mini;
                } else if (c[i].F > c[j].F){
                    printPal(2 * mini + 1, c[i].S + 'a', c[j].S + 'a');
                    c[i].F -= (mini + 1), c[j].F -= mini;
                } else if (c[j].F > c[i].F){
                    printPal(2 * mini + 1, c[j].S + 'a', c[i].S + 'a');
                    c[i].F -= mini, c[j].F -= (mini + 1);
                }
            }
        } else {
            i++;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ROF(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define OO ((1LL << 31) - 1)
#define eps 1e-12
#define in(a, b) ((b).find(a) != (b).end())
#define sgn(a) ((a) > eps ? 1 : ((a) < -eps ? -1 : 0))
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
template <typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using max_heap = priority_queue<T>;

int cnt[26] = {0};

void printPal(int len, char a, char b){
    if (len > 1){
        cout << a;
        printPal(len - 2, b, a);
        cout << a;
    } else if (len == 1){
        cout << a;
    } else {
        return;
    }
}

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    int n, i, j, k;
    string s;
    cin >> n >> s;
    for (i = 0; i < n; i++){
        cnt[(int)(s[i] - 'a')]++;
    }
    vector<pi> c;
    for (i = 0; i < 26; i++){
        if (cnt[i] > 0){
            c.PB({cnt[i], i});
        }
    }
    sort(c.rbegin(), c.rend());
    j = 1;
    n = c.size();
    for (i = 0; i < n;){
        if (c[i].F > 0){
            while ((i == j) || (j < n && c[j].F <= 0)){
                j++;
            }
            if (j == n){
                for (; c[i].F > 0; c[i].F--){
                    cout << (char)(c[i].S + 'a');
                }
            } else {
                int mini = min(c[i].F, c[j].F);
                if (c[i].F == c[j].F){
                    printPal(2 * mini, c[i].S + 'a', c[j].S + 'a');
                    c[i].F -= mini, c[j].F -= mini;
                } else if (c[i].F > c[j].F){
                    printPal(2 * mini + 1, c[i].S + 'a', c[j].S + 'a');
                    c[i].F -= (mini + 1), c[j].F -= mini;
                } else if (c[j].F > c[i].F){
                    printPal(2 * mini + 1, c[j].S + 'a', c[i].S + 'a');
                    c[i].F -= mini, c[j].F -= (mini + 1);
                }
            }
        } else {
            i++;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ROF(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define OO ((1LL << 31) - 1)
#define eps 1e-12
#define in(a, b) ((b).find(a) != (b).end())
#define sgn(a) ((a) > eps ? 1 : ((a) < -eps ? -1 : 0))
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
template <typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using max_heap = priority_queue<T>;

int cnt[26] = {0};

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    int n, i, j, k;
    string s;
    cin >> n >> s;
    for (i = 0; i < n; i++){
        cnt[(int)(s[i] - 'a')]++;
    }
    vector<pi> c;
    for (i = 0; i < 26; i++){
        if (cnt[i] > 0){
            c.PB({cnt[i], i});
        }
    }
    sort(c.rbegin(), c.rend());
    j = 1;
    n = c.size();
    for (i = 0; i < n;){
        if (c[i].F > 0){
            while ((i == j) || (j < n && c[j].F <= 0)){
                j++;
            }
            if (j == n){
                for (; c[i].F > 0; c[i].F--){
                    cout << (char)(c[i].S + 'a');
                }
            } else {
                int mini = min(c[i].F, c[j].F);
                if (c[i].F == c[j].F){
                    for (k = 0; k < 2 * mini; k++){
                        if (k % 2 == 0){
                            cout << (char)(c[i].S + 'a');
                        } else {
                            cout << (char)(c[j].S + 'a');
                        }
                    }
                    c[i].F -= mini, c[j].F -= mini;
                } else if (c[i].F > c[j].F){
                    for (k = 0; k < 2 * mini + 1; k++){
                        if (k % 2 == 0){
                            cout << (char)(c[i].S + 'a');
                        } else {
                            cout << (char)(c[j].S + 'a');
                        }
                    }
                    c[i].F -= (mini + 1), c[j].F -= mini;
                } else if (c[j].F > c[i].F){
                    for (k = 0; k < 2 * mini + 1; k++){
                        if (k % 2 == 0){
                            cout << (char)(c[j].S + 'a');
                        } else {
                            cout << (char)(c[i].S + 'a');
                        }
                    }
                    c[i].F -= mini, c[j].F -= (mini + 1);
                }
            }
        } else {
            i++;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ROF(i, a, b) for (int i = (a); i >= (b); i--)
#define all(x) (x).begin(), (x).end()
#define OO ((1LL << 31) - 1)
#define eps 1e-12
#define in(a, b) ((b).find(a) != (b).end())
#define sgn(a) ((a) > eps ? 1 : ((a) < -eps ? -1 : 0))
#define MOD 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
template <typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using max_heap = priority_queue<T>;

int main(){
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    int n;
    string s;
    cin >> n >> s;
    sort(s.begin(), s.end());
    cout << s;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define DOWN(i,a,b) for(int i=a;i>=b;--i)
#define EPS 1e-9
int n,k;
string s;

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	cin>>n>>k;
	cin>>s;
	string s2,s3;
	REP(i,0,n-2){
		s2=s.substr(i,2);
		s3=s.substr(i,3);
		if((s3=="477" && i%2==0) || (s3=="447" && i%2==1)){
			if(k%2==1){
				s[i+1]=='4'+'7'-s[i+1]; //thay doi
			}
			break;
		}
		else if(s2=="47")
		{
			k--;
			if(i%2==0){
				s[i+1]='4';
			}
			else s[i]='7';
		}
	}
	cout<<s;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define DOWN(i,a,b) for(int i=a;i>=b;--i)
#define EPS 1e-9
int n,k;
string s;

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	cin>>n>>k;
	cin>>s;
	if(k==0){ cout<<s; return 0;}
	s="_"+s;
	string s2,s3;
	REP(i,1,n-1){
		s2=s.substr(i,2);
		s3=s.substr(i,3);
		if(i%2==1 &&(s3=="477"  || s3=="447" )){
			//cout<<"!!!"<<endl;
			if(k%2==1){
				//cout<<"Changed"<<" "<<k<<" "<<s3<<endl;
				s[i+1]='4'+'7'-s[i+1]; //thay doi
			}
			break;
		}
		else if(s2=="47")
		{
			k--;
			if(i%2==1){
				s[i+1]='4';
			}
			else s[i]='7';
		}
	}
	s=s.substr(1,n);
	cout<<s;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define DOWN(i,a,b) for(int i=a;i>=b;--i)
#define EPS 1e-9
int n,k;
string s;

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	cin>>n>>k;
	cin>>s;
	s="_"+s;
	string s2,s3;
	REP(i,1,n-1){
		s2=s.substr(i,2);
		s3=s.substr(i,3);
		if(i%2==1 &&(s3=="477"  || s3=="447" )){
			//cout<<"!!!"<<endl;
			if(k%2==1){
				//cout<<"Changed"<<" "<<k<<" "<<s3<<endl;
				s[i+1]='4'+'7'-s[i+1]; //thay doi
			}
			break;
		}
		else if(s2=="47")
		{
			k--;
			if(i%2==1){
				s[i+1]='4';
			}
			else s[i]='7';
		}
	}
	s=s.substr(1,n);
	cout<<s;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define DOWN(i,a,b) for(int i=a;i>=b;--i)
#define EPS 1e-9
int n,k;
string s;

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	cin>>n>>k;
	cin>>s;
	if(k==0){ cout<<s; return 0;}
	s="_"+s;
	string s2,s3;
	REP(i,1,n-1){
		s2=s.substr(i,2);
		s3=s.substr(i,3);
		if(i%2==1 &&(s3=="477"  || s3=="447" )){
			if(k%2==1){
				s[i+1]='4'+'7'-s[i+1]; //thay doi
			}
			break;
		}
		else if(s2=="47")
		{
			k--;
			if(i%2==1){
				s[i+1]='4';
			}
			else s[i]='7';
			if(k==0) break;
		}
	}
	s=s.substr(1,n);
	cout<<s;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define DOWN(i,a,b) for(int i=a;i>=b;--i)
#define EPS 1e-9
int n,k;
string s;

int main()
{
	//freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
	cin>>n>>k;
	cin>>s;
	s="_"+s;
	string s2,s3;
	REP(i,1,n-1){
		s2=s.substr(i,2);
		s3=s.substr(i,3);
		if(i%2==1 &&(s3=="477"  || s3=="447" )){
			//cout<<"!!!"<<endl;
			if(k%2==1){
				//cout<<"Changed"<<" "<<k<<" "<<s3<<endl;
				s[i+1]='4'+'7'-s[i+1]; //thay doi
			}
			break;
		}
		else if(s2=="47")
		{
			k--;
			if(i%2==1){
				s[i+1]='4';
			}
			else s[i+1]='7';
		}
	}
	s=s.substr(1,n);
	cout<<s;
	return 0;
}


#include <algorithm>
#include <bitset>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <string.h>
#include <vector>

using namespace std;

#define ALL(a)  (a).begin(),(a).end()
#define REP(i, n) for(int i=0; i<(int)(n); i++)
#define FOR(i, s, e) for (int i = (int)(s); i < (int)(e); i++)
#define EACH(itr,c) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define ABS(x) ((x) < 0 ? - (x) : (x))
#define SIZE(buff) (sizeof(buff)/sizeof(buff[0]))
#define SORT(c) sort((c).begin(),(c).end())
#define MP make_pair
#define INF 999999999
#define DISP(x) cout << #x << " : " << x << endl

typedef long long int LL;

const double pi = acos(-1.0);

int main() {
    int n, k;
    string s;

    cin >> n >> k;
    cin >> s;
    int i = 0;

    for (; k > 0; k--) {
        bool update = false;

        if (i+2 < n && i % 2 == 0) {
            if (s[i] == '4' && (s[i+1] == '4' || s[i+1] == '7') && s[i+2] == '7') {
                if (k % 2)
                    s[i+1] = '4' - s[i+1] + '7';
                break;
            }
        }

        for (int j = i; j < n - 1; j++) {
            if (s[j] == '4' && s[j+1] == '7') {
                if (j % 2 == 0) {
                    s[j] = s[j+1] = '4';
                    i = j;
                }
                else {
                    s[j] = s[j+1] = '7';
                    i = max(0, j-2);
                }
                update = true;
                break;
            }
        }

        if (!update)
            break;
    }

    cout << s << endl;
    return 0;
}