#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
int n, a[10];
char s[3], t[3];
int main() {
  n = read(), scanf("%s%s", s + 1, t + 1);
  for (register int i = (1); i <= (3); i++) a[i] = 'a' + i - 1;
  bool Flag = (s[1] == s[2] || t[1] == t[2]);
  for (register int i = (1); i <= (5000000); i++) {
    random_shuffle(a + 1, a + 4);
    bool flag = 1;
    if (Flag) a[4] = a[1];
    for (register int j = (1); j <= (2 + Flag); j++) {
      if (a[j] == s[1] && a[j + 1] == s[2]) flag = 0;
      if (a[j] == t[1] && a[j + 1] == t[2]) flag = 0;
    }
    if (flag) break;
  }
  if (Flag) {
    puts("YES");
    for (register int i = (1); i <= (n); i++)
      for (register int j = (1); j <= (3); j++) printf("%c", a[j]);
  } else {
    puts("YES");
    for (register int i = (1); i <= (3); i++)
      for (register int j = (1); j <= (n); j++) printf("%c", a[i]);
  }
}
