#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double pi = 3.1415926535897932384626;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int n;
string s1, s2, tmp, s[6] = {"abc", "acb", "bac", "bca", "cab", "cba"};
bool check() {
  if (tmp.find(s1) >= tmp.npos && tmp.find(s2) >= tmp.npos) return 1;
  return 0;
}
int main() {
  n = read();
  cin >> s1 >> s2;
  for (int i = 0; i < 6; ++i) {
    tmp.clear();
    for (int j = 1; j <= n; ++j) tmp += s[i];
    if (check()) {
      printf("YES\n");
      cout << tmp << '\n';
      return 0;
    }
    tmp.clear();
    for (int j = 1; j <= n; ++j) tmp += s[i][0];
    for (int j = 1; j <= n; ++j) tmp += s[i][1];
    for (int j = 1; j <= n; ++j) tmp += s[i][2];
    if (check()) {
      printf("YES\n");
      cout << tmp << '\n';
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
