#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t;
  cin >> t;
  string a, b, c = "", per = "abc";
  cin >> a;
  cin >> b;
  vector<string> res;
  do {
    string cur;
    for (long long j = 0; j < t; j++) cur += per;
    res.push_back(cur);
    res.push_back(string(t, per[0]) + string(t, per[1]) + string(t, per[2]));
  } while (next_permutation(per.begin(), per.end()));
  for (auto str : res) {
    if (str.find(a) == string::npos && str.find(b) == string::npos) {
      cout << "YES";
      cout << endl;
      cout << str;
      cout << endl;
      return 0;
    }
  }
  cout << "NO";
  cout << endl;
  return 0;
}
