#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n;
string s, t;
int f[N][3], pre[N][3], ans[N];
int main() {
  cin >> n >> s >> t;
  for (int i = 0; i < 2; ++i) s[i] -= 'a' - 1, t[i] -= 'a' - 1;
  printf("YES\n");
  if (t[0] == t[1]) swap(t[0], s[0]), swap(t[1], s[1]);
  if (s[0] != s[1] && t[0] != t[1]) {
    int a[4];
    for (int i = 1; i <= 3; ++i) a[i] = i;
    do {
      bool flag = 1;
      for (int i = 1; i <= 2; ++i) {
        if (s[0] == a[i] && s[1] == a[i + 1]) flag = 0;
        if (t[0] == a[i] && t[1] == a[i + 1]) flag = 0;
      }
      if (flag) {
        for (int j = 1; j <= 3; ++j)
          for (int i = 1; i <= n; ++i) putchar(a[j] + 'a' - 1);
        return 0;
      }
    } while (next_permutation(a + 1, a + 4));
  } else if (s[0] == s[1] && t[0] == t[1]) {
    for (int i = 1; i <= 3 * n; ++i) putchar(i % 3 + 'a');
    return 0;
  } else {
    int s0 = s[0];
    if (t[0] != s0 && t[1] != s0) {
      for (int i = 1; i <= n; ++i) {
        putchar(t[0] + 'a' - 1);
        putchar(s0 + 'a' - 1);
        putchar(t[1] + 'a' - 1);
      }
      return 0;
    } else {
      static bool use[4];
      use[s0] = use[t[0]] = use[t[1]] = 1;
      for (int i = 1; i <= 3; ++i)
        if (!use[i]) {
          for (int j = 1; j <= n; ++j) {
            putchar(i + 'a' - 1);
            putchar(t[1] + 'a' - 1);
            putchar(t[0] + 'a' - 1);
          }
          return 0;
        }
    }
  }
}
