#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
void solve(int test) {
  int n;
  string s, t;
  srand(time(0));
  cin >> n >> s >> t;
  vector<string> start;
  start.push_back("abc");
  start.push_back("acb");
  start.push_back("bac");
  start.push_back("bca");
  start.push_back("cab");
  start.push_back("cba");
  for (string st : start) {
    string curr = st;
    for (int i = 3; i < 3 * n; i++) {
      int sz = curr.length();
      char c = curr[sz - 1] ^ curr[sz - 2] ^ 'a' ^ 'b' ^ 'c';
      curr += c;
    }
    bool ok = true;
    for (int i = 0; i < 3 * n - 1; i++) {
      if (curr.substr(i, 2) == s || curr.substr(i, 2) == t) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << "YES\n";
      cout << curr;
      return;
    }
  }
  for (string st : start) {
    string curr = "";
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) curr += st[i];
    }
    bool ok = true;
    for (int i = 0; i < 3 * n - 1; i++) {
      if (curr.substr(i, 2) == s || curr.substr(i, 2) == t) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << "YES\n";
      cout << curr;
      return;
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  for (int test = 1; test <= t; test++) {
    solve(test);
  }
  return 0;
}
