#include <bits/stdc++.h>
using namespace std;
// why am I so weak
int n;
char s[5055];
int main() {
scanf("%d", &n);
int a = 0, b = 0, c = 0;
{
char buf[5055];
scanf("%s", buf);
for (int i = 0; i < n; i++) {
if (buf[i] == 'a') a++;
if (buf[i] == 'b') b++;
if (buf[i] == 'c') c++;
}
}
int a_left = 0, b_left = 0, c_left = 0;
scanf("%s", s);
for (int i = 0; i < n; i++) {
if (s[i] == 'a') a_left++;
if (s[i] == 'b') b_left++;
if (s[i] == 'c') c_left++;
}
for (int i = 0; i < n; i++) {
if (s[i] == 'a') {
// use b or c
a_left--;
if (b > 0 && a_left <= c + b - 1 && c_left <= a + b - 1) {
b--;
printf("b");
} else {
c--;
printf("c");
}
} else if (s[i] == 'b') {
// a or c
b_left--;
if (a > 0 && b_left <= a + c - 1 && c_left <= a + b - 1) {
a--;
printf("a");
} else {
c--;
printf("c");
}
} else {
// a or b
c_left--;
if (a > 0 && b_left <= a + c - 1 && c_left <= a + b - 1) {
a--;
printf("a");
} else {
b--;
printf("b");
}
}
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKLy8gd2h5IGFtIEkgc28gd2VhawogCmludCBuOwpjaGFyIHNbNTA1NV07CiAKaW50IG1haW4oKSB7CiAgICBzY2FuZigiJWQiLCAmbik7CiAKICAgIGludCBhID0gMCwgYiA9IDAsIGMgPSAwOwogCiAgICB7CiAgICAgICAgY2hhciBidWZbNTA1NV07CiAgICAgICAgc2NhbmYoIiVzIiwgYnVmKTsKIAogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIGlmIChidWZbaV0gPT0gJ2EnKSBhKys7CiAgICAgICAgICAgIGlmIChidWZbaV0gPT0gJ2InKSBiKys7CiAgICAgICAgICAgIGlmIChidWZbaV0gPT0gJ2MnKSBjKys7CiAgICAgICAgfQogICAgfQogCiAgICBpbnQgYV9sZWZ0ID0gMCwgYl9sZWZ0ID0gMCwgY19sZWZ0ID0gMDsKIAogICAgc2NhbmYoIiVzIiwgcyk7CiAKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgaWYgKHNbaV0gPT0gJ2EnKSBhX2xlZnQrKzsKICAgICAgICBpZiAoc1tpXSA9PSAnYicpIGJfbGVmdCsrOwogICAgICAgIGlmIChzW2ldID09ICdjJykgY19sZWZ0Kys7CiAgICB9CiAKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgaWYgKHNbaV0gPT0gJ2EnKSB7CiAgICAgICAgICAgIC8vIHVzZSBiIG9yIGMKIAogICAgICAgICAgICBhX2xlZnQtLTsKIAogICAgICAgICAgICBpZiAoYiA+IDAgJiYgYV9sZWZ0IDw9IGMgKyBiIC0gMSAmJiBjX2xlZnQgPD0gYSArIGIgLSAxKSB7CiAgICAgICAgICAgICAgICBiLS07CiAgICAgICAgICAgICAgICBwcmludGYoImIiKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGMtLTsKICAgICAgICAgICAgICAgIHByaW50ZigiYyIpOwogICAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIGlmIChzW2ldID09ICdiJykgewogICAgICAgICAgICAvLyBhIG9yIGMKIAogICAgICAgICAgICBiX2xlZnQtLTsKIAogICAgICAgICAgICBpZiAoYSA+IDAgJiYgYl9sZWZ0IDw9IGEgKyBjIC0gMSAmJiBjX2xlZnQgPD0gYSArIGIgLSAxKSB7CiAgICAgICAgICAgICAgICBhLS07CiAgICAgICAgICAgICAgICBwcmludGYoImEiKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGMtLTsKICAgICAgICAgICAgICAgIHByaW50ZigiYyIpOwogICAgICAgICAgICB9CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgLy8gYSBvciBiCiAKICAgICAgICAgICAgY19sZWZ0LS07CiAKICAgICAgICAgICAgaWYgKGEgPiAwICYmIGJfbGVmdCA8PSBhICsgYyAtIDEgJiYgY19sZWZ0IDw9IGEgKyBiIC0gMSkgewogICAgICAgICAgICAgICAgYS0tOwogICAgICAgICAgICAgICAgcHJpbnRmKCJhIik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBiLS07CiAgICAgICAgICAgICAgICBwcmludGYoImIiKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KIAogICAgcmV0dXJuIDA7Cn0=