You are given a string S of length 2N, containing N occurrences of `a` and N occurrences of `b`.

You will choose some of the characters in S. Here, for each i = 1,2,...,N, it is not allowed to choose exactly one of the following two: the i-th occurrence of `a` and the i-th occurrence of `b`. (That is, you can only choose both or neither.) Then, you will concatenate the chosen characters (without changing the order).

Find the lexicographically largest string that can be obtained in this way.

Constraints

* 1 \leq N \leq 3000
* S is a string of length 2N containing N occurrences of `a` and N occurrences of `b`.

Input

Input is given from Standard Input in the following format:


N
S


Output

Print the lexicographically largest string that satisfies the condition.

Examples

Input

3
aababb


Output

abab


Input

3
bbabaa


Output

bbabaa


Input

6
bbbaabbabaaa


Output

bbbabaaa


Input

9
abbbaababaababbaba


Output

bbaababababa
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned ll
#define uint ungigned
#define db double
#define pii pair<int,int>
#define pll pair<ll,ll> 
#define pli pair<ll,int>
#define vi vector<int>
#define vpi vector<pii >
#define IT iterator
 
#define PB push_back
#define MK make_pair
#define LB lower_bound
#define UB upper_bound
#define y1 wzpakking 
#define fi first
#define se second
#define BG begin
#define ED end
 
#define For(i,j,k) for (int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define UPD(x,y) (((x)+=(y))>=mo?(x)-=mo:233)
#define CLR(a,v) memset(a,v,sizeof(a))
#define CPY(a,b) memcpy(a,b,sizeof(a))
#define sqr(x) (1ll*x*x)
 
#define LS3 k*2,l,mid
#define RS3 k*2+1,mid+1,r
#define LS5 k*2,l,mid,x,y
#define RS5 k*2+1,mid+1,r,x,y
#define GET pushdown(k);int mid=(l+r)/2
#define INF (1<<30)
using namespace std;

const int N=3005;
char s[N*2];
int a[N],b[N],tp[N*2];
string ss[N],f[N];
int n,an,bn;
string work(int l,int r){
	int tl=-1,tr;
	For(i,1,n) if (a[i]>=l&&a[i]<=r){
		if (tl==-1) tl=i; tr=i;
	}
	string ans="";
	if (a[tl]<b[tl]){
		int las=0;
		For(i,tl,tr) if (las<a[i])
			ans=ans+"ab",las=b[i];
		return ans;
	}
	For(i,tl,tr){
		string c="";
		For(j,l,r) if (tp[j]>=i) c.PB(s[j]);
		ans=max(ans,c);
	}
	return ans;
}
int main(){
	scanf("%d%s",&n,s+1);
	For(i,1,n+n)
		if (s[i]=='a') a[tp[i]=++an]=i;
		else b[tp[i]=++bn]=i;
	int cnt=1,sum=0,las=0;
	For(i,1,n+n){
		sum+=(s[i]=='a'?1:-1);
		if (!sum) ss[++cnt]=work(las,i),las=i+1;
	}
	Rep(i,cnt,1)
		f[i]=max(ss[i]+f[i+1],f[i+1]);
	cout<<f[1];
} 