#include <bits/stdc++.h>
using namespace std;
const long long oo = 1e18;
long long i, n, m, ans, f, cnt, kl, x, mx = -1, k, o;
string u, s, s1, u1, u2;
int main() {
  cin >> n;
  cin >> s >> s1;
  u = "abc";
  while (next_permutation(u.begin(), u.end())) {
    if (!o) u = "abc";
    o = 1;
    f = 0;
    u1 = string(n, u[0]) + string(n, u[1]) + string(n, u[2]);
    u2 = "";
    for (i = 0; i < n; ++i) u2 += u;
    for (i = 0; i < u1.size() - 1; ++i) {
      if (u1.substr(i, 2) == s || u1.substr(i, 2) == s1) {
        f = 1;
        break;
      }
    }
    if (!f) {
      cout << "YES" << endl << u1 << endl;
      return 0;
    }
    f = 0;
    u1 = u2;
    for (i = 0; i < u1.size() - 1; ++i) {
      if (u1.substr(i, 2) == s || u1.substr(i, 2) == s1) {
        f = 1;
        break;
      }
    }
    if (!f) {
      cout << "YES" << endl << u1 << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
