#include <bits/stdc++.h>
using namespace std;
bool contains(string str, string pre) {
  int s = str.length(), p = pre.length();
  if (s < p) return false;
  for (int i = 0; i <= s - p; i++) {
    int j;
    for (j = 0; j < p; j++) {
      if (str[i + j] != pre[j]) break;
    }
    if (j == p) return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  string s, t;
  cin >> s >> t;
  string pat = "abc";
  bool flag = false;
  do {
    string tmp = pat;
    if (n > 1) tmp += pat[0];
    if (!contains(tmp, s) && !contains(tmp, t)) {
      flag = true;
      break;
    }
  } while (next_permutation(pat.begin(), pat.end()));
  if (!flag) {
    if (s[0] == t[0]) {
      cout << "YES" << endl;
      for (char c = 'a'; c <= 'c'; c++) {
        if (c == s[0]) continue;
        for (int i = 0; i < n; i++) {
          cout << c;
        }
      }
      for (int i = 0; i < n; i++) cout << s[0];
      cout << endl;
    } else if (s[1] == t[1]) {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) cout << s[1];
      for (char c = 'a'; c <= 'c'; c++) {
        if (c == s[1]) continue;
        for (int i = 0; i < n; i++) {
          cout << c;
        }
      }
      cout << endl;
    } else if (s[0] == t[1] && s[1] == t[0]) {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) cout << s[0];
      for (char c = 'a'; c <= 'c'; c++) {
        if (c == s[1] || c == s[0]) continue;
        for (int i = 0; i < n; i++) {
          cout << c;
        }
      }
      for (int i = 0; i < n; i++) cout << s[1];
      cout << endl;
    } else {
      cout << "NO" << endl;
    }
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << pat;
  cout << endl;
  return 0;
}
