#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 3e5 + 10;
long long a[N];
map<string, long long> mp;
string second, t;
long long check(string &a, string &b) {
  long long flag = 0;
  for (long long i = 0; i < a.size() - 1; i++) {
    string pp = "";
    pp += a[i];
    pp += a[i + 1];
    if (mp[pp] > 0) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "YES" << endl;
    cout << a << endl;
    exit(0);
  }
  flag = 0;
  for (long long i = 0; i < b.size() - 1; i++) {
    string pp1 = "";
    pp1 += b[i];
    pp1 += b[i + 1];
    if (mp[pp1] > 0) {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "YES" << endl;
    cout << b << endl;
    exit(0);
  }
  return 0;
}
int32_t main() {
  long long n;
  cin >> n;
  vector<char> v;
  cin >> second >> t;
  mp[second]++;
  mp[t]++;
  v.push_back('a');
  v.push_back('b');
  v.push_back('c');
  do {
    string a = "", b = "";
    for (long long i = 0; i < 3; i++) {
      a += v[i];
    }
    string p = "";
    for (long long i = 0; i < n; i++) {
      p += a;
    }
    string pp = "";
    for (long long i = 0; i < 3; i++) {
      for (long long j = 0; j < n; j++) {
        pp += v[i];
      }
    }
    if (check(p, pp) == 0) continue;
  } while (next_permutation(v.begin(), v.end()));
  cout << "NO" << endl;
}
