#include <bits/stdc++.h>
using namespace std;
char store[] = {'a', 'b', 'c'};
bool on[3][3], done = 1;
void run(int i, int j, int k, int n) {
  string ans;
  ans += store[i];
  int abc[3];
  abc[0] = n, abc[1] = n, abc[2] = n;
  abc[i]--;
  int sz = 1;
  for (int l = 1; l < (3 * n); l++) {
    if (on[ans[l - 1] - 'a'][store[i] - 'a'] == 0 and abc[i] > 0) {
      ans += store[i];
      abc[i]--;
      sz++;
    } else if (on[ans[l - 1] - 'a'][store[j] - 'a'] == 0 and abc[j] > 0) {
      ans += store[j];
      abc[j]--;
      sz++;
    } else if (on[ans[l - 1] - 'a'][store[k] - 'a'] == 0 and abc[k] > 0) {
      ans += store[k];
      abc[k]--;
      sz++;
    }
    if (sz != (l + 1)) {
      break;
    }
  }
  if (sz == (3 * n)) {
    cout << "YES"
         << "\n";
    cout << ans << "\n";
    done = 0;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  on[s[0] - 'a'][s[1] - 'a'] = 1, on[t[0] - 'a'][t[1] - 'a'] = 1;
  if (done) {
    run(0, 1, 2, n);
  }
  if (done) {
    run(0, 2, 1, n);
  }
  if (done) {
    run(1, 0, 2, n);
  }
  if (done) {
    run(1, 2, 0, n);
  }
  if (done) {
    run(2, 0, 1, n);
  }
  if (done) {
    run(2, 1, 0, n);
  }
  if (done) {
    cout << "NO"
         << "\n";
  }
  return 0;
}
