#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string ar1[] = {"abca", "acba", "bacb", "bcab", "cabc", "cbac"};
  string ar2[] = {"aabbcc", "aaccbb", "bbaacc", "bbccaa", "ccaabb", "ccbbaa"};
  string s, t;
  cin >> s >> t;
  string ans;
  if (s[0] == s[1] || t[0] == t[1]) {
    for (int i = 0; i < 6; i++) {
      size_t f1 = ar1[i].find(s);
      size_t f2 = ar1[i].find(t);
      if (f1 > 3 && f2 > 3) {
        ans = ar1[i].substr(0, 3);
        break;
      }
    }
  } else {
    for (int i = 0; i < 6; i++) {
      size_t f1 = ar2[i].find(s);
      size_t f2 = ar2[i].find(t);
      if (f1 > 5 && f2 > 5) {
        ans = ar2[i];
        break;
      }
    }
  }
  cout << "YES" << endl;
  if (ans.length() > 3) {
    for (int i = 0; i < n; i++) cout << ans[0];
    for (int i = 0; i < n; i++) cout << ans[2];
    for (int i = 0; i < n; i++) cout << ans[4];
  } else {
    for (int i = 0; i < n; i++) cout << ans;
  }
  cout << endl;
  return 0;
}
