#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int P = 998244353;
const int INF = 0x3f3f3f3f;
inline int mul(const int& a, const int& b) { return 1ll * a * b % P; }
inline int add(const int& a, const int& b) {
  return (a + b >= P) ? a + b - P : a + b;
}
inline int sub(const int& a, const int& b) {
  return (a - b < 0) ? a - b + P : a - b;
}
inline int read() {
  int x(0), w(1);
  char c = getchar();
  while (c ^ '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') w = -1, c = getchar();
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * w;
}
int n, g[5][5];
char s1[10], s2[10];
int main() {
  scanf("%d\n", &n);
  scanf("%s\n%s", s1, s2);
  for (int i = 1; i <= 3; ++i) {
    for (int j = 1; j <= 3; ++j) {
      g[i][j] = 1;
    }
  }
  g[s1[0] - 'a' + 1][s1[1] - 'a' + 1] = 0;
  g[s2[0] - 'a' + 1][s2[1] - 'a' + 1] = 0;
  if (g[1][2] && g[2][3] && g[3][1]) {
    puts("YES");
    for (int i = 1; i <= n; ++i) {
      printf("abc");
    }
    printf("\n");
    return 0;
  }
  if (g[1][3] && g[3][2] && g[2][1]) {
    puts("YES");
    for (int i = 1; i <= n; ++i) {
      printf("acb");
    }
    printf("\n");
    return 0;
  }
  if (g[1][2] == 0 && g[2][1] == 0) {
    puts("YES");
    for (int i = 1; i <= n; ++i) {
      if (i & 1)
        printf("acb");
      else
        printf("bca");
    }
    printf("\n");
    return 0;
  }
  if (g[1][3] == 0 && g[3][1] == 0) {
    puts("YES");
    for (int i = 1; i <= n; ++i) {
      if (i & 1)
        printf("abc");
      else
        printf("cba");
    }
    printf("\n");
    return 0;
  }
  if (g[2][3] == 0 && g[3][2] == 0) {
    puts("YES");
    for (int i = 1; i <= n; ++i) {
      if (i & 1)
        printf("bca");
      else
        printf("acb");
    }
    printf("\n");
    return 0;
  }
  if (g[1][2] && g[2][3]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("a");
    for (int i = 1; i <= n; ++i) printf("b");
    for (int i = 1; i <= n; ++i) printf("c");
    return 0;
  }
  if (g[1][3] && g[3][2]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("a");
    for (int i = 1; i <= n; ++i) printf("c");
    for (int i = 1; i <= n; ++i) printf("b");
    return 0;
  }
  if (g[2][1] && g[1][3]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("b");
    for (int i = 1; i <= n; ++i) printf("a");
    for (int i = 1; i <= n; ++i) printf("c");
    return 0;
  }
  if (g[2][3] && g[3][1]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("b");
    for (int i = 1; i <= n; ++i) printf("c");
    for (int i = 1; i <= n; ++i) printf("a");
    return 0;
  }
  if (g[3][1] && g[1][2]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("c");
    for (int i = 1; i <= n; ++i) printf("a");
    for (int i = 1; i <= n; ++i) printf("b");
    return 0;
  }
  if (g[3][2] && g[2][1]) {
    printf("YES\n");
    for (int i = 1; i <= n; ++i) printf("c");
    for (int i = 1; i <= n; ++i) printf("b");
    for (int i = 1; i <= n; ++i) printf("a");
    return 0;
  }
  puts("NO");
  return 0;
}
