#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  vector<string> order = {"abc", "bac", "bca", "acb", "cab", "cba"};
  vector<string> cond;
  for (string s : order) {
    string res1, res2;
    for (int i = 0; i < n; i++) {
      res1.append(s);
    }
    cond.push_back(res1);
    for (char c : s) {
      for (int i = 0; i < n; i++) {
        res2.push_back(c);
      }
    }
    cond.push_back(res2);
  }
  for (auto& ans : cond) {
    bool ok = true;
    for (int i = 0; i < (int)ans.size(); i++) {
      string k = ans.substr(i, 2);
      if (k == s || k == t) ok = false;
    }
    if (ok) {
      cout << "YES" << endl;
      cout << ans << endl;
      return 0;
    }
  }
  return 0;
}
