#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAX = 2e5 + 5;
const long long MAX2 = 11;
const long long MOD = 998244353;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 450;
int n, z[15], id, sz, cnt[3], rem;
string s, t, ans;
bool x[3][3], st;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s >> t;
  if (s[0] != s[1] && t[0] != t[1]) {
    if (s[0] == t[0] && s[1] != t[1]) {
      for (long long i = 1; i <= n; ++i) ans.push_back(t[1]);
      for (long long i = 1; i <= n; ++i) ans.push_back(s[1]);
      for (long long i = 1; i <= n; ++i) ans.push_back(s[0]);
      return cout << "YES\n" << ans << "\n", 0;
    } else if (s[0] != t[0] && s[1] == t[1]) {
      for (long long i = 1; i <= n; ++i) ans.push_back(s[1]);
      for (long long i = 1; i <= n; ++i) ans.push_back(s[0]);
      for (long long i = 1; i <= n; ++i) ans.push_back(t[0]);
      return cout << "YES\n" << ans << "\n", 0;
    }
  }
  x[s[0] - 'a'][s[1] - 'a'] = x[t[0] - 'a'][t[1] - 'a'] = 1;
  if (n == 1) {
    for (long long i = 0; i <= 2; ++i) v.push_back(i);
    do {
      st = 1;
      for (long long i = 1; i <= 2; ++i)
        if (x[v[i - 1]][v[i]]) {
          st = 0;
          break;
        }
      if (st) break;
    } while (next_permutation(v.begin(), v.end()));
    if (st)
      for (auto i : v) ans.push_back(i + 'a');
  } else if (n == 2) {
    for (long long i = 0; i <= 2; ++i)
      for (long long j = 1; j <= 2; ++j) v.push_back(i);
    do {
      st = 1;
      for (long long i = 1; i <= 5; ++i)
        if (x[v[i - 1]][v[i]]) {
          st = 0;
          break;
        }
      if (st) break;
    } while (next_permutation(v.begin(), v.end()));
    if (st)
      for (auto i : v) ans.push_back(i + 'a');
  } else if (n == 3) {
    for (long long i = 0; i <= 2; ++i)
      for (long long j = 1; j <= 3; ++j) v.push_back(i);
    do {
      st = 1;
      for (long long i = 1; i <= 8; ++i)
        if (x[v[i - 1]][v[i]]) {
          st = 0;
          break;
        }
      if (st) break;
    } while (next_permutation(v.begin(), v.end()));
    if (st)
      for (auto i : v) ans.push_back(i + 'a');
  } else {
    rem = n % 2;
    for (long long i = 0; i <= 2; ++i)
      for (long long j = 1; j <= 2; ++j) v.push_back(i);
    do {
      if (rem) {
        for (long long i = 0; i <= 2; ++i) cnt[i] = 0;
        for (long long i = 0; i <= 2; ++i) ++cnt[v[i]];
        if (cnt[0] != 1 || cnt[1] != 1 || cnt[2] != 1) continue;
      }
      st = 1;
      id = 0;
      for (long long i = 0; i <= 5; ++i) z[++id] = v[i];
      for (long long i = 0; i <= 2; ++i) z[++id] = v[i];
      for (long long i = 2; i <= id; ++i)
        if (x[z[i - 1]][z[i]]) {
          st = 0;
          break;
        }
      if (st) break;
    } while (next_permutation(v.begin(), v.end()));
    if (st) {
      sz = n / 2;
      for (long long j = 1; j <= sz; ++j)
        for (auto i : v) ans.push_back(i + 'a');
      sz = (n % 2) * 3 - 1;
      for (long long i = 0; i <= sz; ++i) ans.push_back(v[i] + 'a');
    } else {
      v.clear();
      for (long long i = 0; i <= 2; ++i)
        for (long long j = 1; j <= 3; ++j) v.push_back(i);
      do {
        if (rem == 1) {
          for (long long i = 0; i <= 2; ++i) cnt[i] = 0;
          for (long long i = 0; i <= 2; ++i) ++cnt[v[i]];
          if (cnt[0] != 1 || cnt[1] != 1 || cnt[2] != 1) continue;
        } else if (rem == 2) {
          for (long long i = 0; i <= 2; ++i) cnt[i] = 0;
          for (long long i = 0; i <= 5; ++i) ++cnt[v[i]];
          if (cnt[0] != 2 || cnt[1] != 2 || cnt[2] != 2) continue;
        }
        st = 1;
        id = 0;
        for (long long i = 0; i <= 8; ++i) z[++id] = v[i];
        for (long long i = 0; i <= 2; ++i) z[++id] = v[i];
        for (long long i = 2; i <= id; ++i)
          if (x[z[i - 1]][z[i]]) {
            st = 0;
            break;
          }
        if (st) break;
      } while (next_permutation(v.begin(), v.end()));
      if (st) {
        sz = n / 3;
        for (long long j = 1; j <= sz; ++j)
          for (auto i : v) ans.push_back(i + 'a');
        sz = (n % 3) * 3 - 1;
        for (long long i = 0; i <= sz; ++i) ans.push_back(v[i] + 'a');
      }
    }
  }
  if (ans.empty())
    return 1;
  else
    cout << "YES\n" << ans << "\n";
  return 0;
}
