#include <bits/stdc++.h>
const int mx = 1e6 + 5;
const int inf = 0x3f3f3f3f;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  string s, t, x = "abc";
  cin >> n >> s >> t;
  vector<string> all;
  while (next_permutation(x.begin(), x.end())) {
    string a = "", b = "";
    for (int i = 0; i < n; ++i) {
      a.push_back(x[0]);
      a.push_back(x[1]);
      a.push_back(x[2]);
      b.push_back(x[0]);
    }
    for (int i = 0; i < n; ++i) b.push_back(x[1]);
    for (int i = 0; i < n; ++i) b.push_back(x[2]);
    all.push_back(a);
    all.push_back(b);
  }
  for (string i : all) {
    bool ans = true;
    for (int j = 0; j < 3 * n - 1; ++j) {
      string si = i.substr(j, 2);
      if (si == s || si == t) {
        ans = false;
      }
    }
    if (ans) {
      cout << "YES\n" << i << '\n';
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
