#include <bits/stdc++.h>
using namespace std;
#define int long long
#define TL ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define rall(s) s.rbegin(),s.rend()
#define all(s) s.begin(),s.end()
#define pb push_back
#define sz(s) s.size()
#define se second
#define fi first
#define ll long long
#define ld long double
#define YES cout<<"YES\n"
#define Yes cout<<"Yes\n"
#define yes cout<<"yes\n"
#define NO cout<<"NO\n"
#define No cout<<"No\n"
#define no cout<<"no\n"
const int N = 1e6 + 9 , mod = 1e9 + 7;
const ll inf = 1e18;
const ll MOD = (ll)1e9+7;
void solve() {
ll n; cin >> n;
string a,b; cin >> a >> b;
map<char, ll> mp;
for(ll i = 0;i<n;i++){
mp[a[i]]++;
} sort(all(a));
for(ll i = 0;i<n;i++){
if(a[i] == b[i]){
if(i + mp[a[i]] >=n){
swap(a[i],a[i-mp[a[i]]]);
mp[a[i]]--;
} else{
swap(a[i], a[i + mp[a[i]]]);
mp[a[i]]--;
}
}
} cout << a << endl;
}
int32_t main(){
//freopen("kgraph.in", "r", stdin);
//freopen("kgraph.out", "w", stdout);
TL;
int test = 1; //cin>>test;
while(test--) solve();
}