#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const long double pi = acos(-1.0);
const long double eps = 1e-5;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  string res = "abc";
  string ans;
  do {
    string tmp;
    for (int i = (1); i <= (n); i++) tmp += res;
    if (tmp.find(s) == tmp.npos && tmp.find(t) == tmp.npos) {
      ans = tmp;
      break;
    }
    tmp.clear();
    for (int i = (1); i <= (n); i++) tmp += res[0];
    for (int i = (1); i <= (n); i++) tmp += res[1];
    for (int i = (1); i <= (n); i++) tmp += res[2];
    if (tmp.find(s) == tmp.npos && tmp.find(t) == tmp.npos) {
      ans = tmp;
      break;
    }
  } while (next_permutation(res.begin(), res.end()));
  if (ans.empty())
    cout << "NO";
  else
    cout << "YES" << '\n' << ans;
  return 0;
}
