#include <bits/stdc++.h>
using namespace std;
const int maxn = 10;
const int INF = 0x3f3f3f3f;
int v[maxn], flag = 0, w[maxn], vis[maxn];
char s1[maxn], s2[maxn];
void dfs(int t, int mode) {
  if (mode == 1) {
    if (t == 4) {
      flag = 1;
      return;
    }
  } else {
    if (t == 4 && (v[3] != s1[0] || v[1] != s1[1]) &&
        (v[3] != s2[0] || v[1] != s2[1])) {
      flag = 1;
      return;
    }
  }
  for (int i = 1; i <= 3; ++i) {
    if (flag) return;
    if (!vis[i] && (t == 1 || (v[t - 1] != s1[0] || w[i] != s1[1]) &&
                                  (v[t - 1] != s2[0] || w[i] != s2[1]))) {
      vis[i] = 1;
      v[t] = w[i];
      dfs(t + 1, mode);
      vis[i] = 0;
    }
  }
}
int main() {
  int n;
  w[1] = 'a';
  w[2] = 'b';
  w[3] = 'c';
  scanf("%d", &n);
  scanf("%s%s", s1, s2);
  printf("YES\n");
  if (s1[0] != s1[1] && s2[0] != s2[1]) {
    dfs(1, 1);
    for (int i = 1; i <= 3; ++i) {
      for (int j = 1; j <= n; ++j) {
        if (j == n && i == 3)
          printf("%c\n", v[i]);
        else
          printf("%c", v[i]);
      }
    }
  } else {
    dfs(1, 0);
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= 3; ++j) {
        if (j == 3 && i == n)
          printf("%c\n", v[j]);
        else
          printf("%c", v[j]);
      }
    }
  }
  return 0;
}
