#include <bits/stdc++.h>
using namespace std;
int fwd[4][3];
int ar[3 * 100000 + 10];
int fr[3];
char s1[5], s2[5];
int cnt;
bool solve(int pos, int p, int target) {
  if (pos > target) {
    return true;
  }
  bool f = false;
  for (int i = 0; i < 3; i++) {
    if (fwd[p][i] != 1 && fr[i] + 1 == cnt) {
      fr[i]++;
      ar[pos] = i;
      f = solve(pos + 1, i, target);
      if (f == true) {
        break;
      }
      ar[pos] = -1;
      fr[i]--;
    }
  }
  return f;
}
bool calc(int p, int n3) {
  bool f = 0;
  memset(fr, 0, sizeof fr);
  cnt = 1;
  ar[0] = p;
  for (int i = 1; i <= n3; i += 3, cnt++) {
    f = solve(i, ar[i - 1], i + 2);
    if (f == 0) break;
  }
  return f;
}
int main() {
  int n, n3;
  scanf("%d", &n);
  scanf(" %s", s1);
  scanf(" %s", s2);
  n3 = 3 * n;
  memset(fwd, -1, sizeof fwd);
  memset(ar, -1, sizeof ar);
  fwd[s1[0] - 'a'][s1[1] - 'a'] = 1;
  fwd[s2[0] - 'a'][s2[1] - 'a'] = 1;
  bool f = 0;
  for (int i = 0; i < 3 && f == 0; i++) {
    f = calc(i, n3);
  }
  if (f == 0) {
    for (int i = 0; i < 3 && f == 0; i++) {
      f = calc(i, 3);
    }
    ar[(2 * n) + 1] = ar[3];
    ar[n + 1] = ar[2];
    int mark = ar[1];
    for (int i = 1; i <= n; i++) {
      ar[i] = mark;
    }
    mark = ar[n + 1];
    for (int i = n + 1; i <= 2 * n; i++) {
      ar[i] = mark;
    }
    mark = ar[(2 * n) + 1];
    for (int i = (2 * n) + 1; i <= n3; i++) {
      ar[i] = mark;
    }
  }
  if (f == 0)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n3; i++) {
      printf("%c", ar[i] + 'a');
    }
    printf("\n");
  }
  return 0;
}
