#include <bits/stdc++.h>
using namespace std;
long long n;
bool vis[5];
char s[5], t[5];
char g[9][9] = {"", "*abc", "*acb", "*bac", "*bca", "*cab", "*cba"};
char m[9][9] = {"",        "*abcabc", "*acbacb", "*bacbac",
                "*bcabca", "*cabcab", "*cbacba"};
template <typename T>
inline void read(T &x) {
  x = 0;
  T w = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 3) + (x << 1) + c - '0';
    c = getchar();
  }
  x *= w;
}
bool isexist(long long lens, char s[], long long lent, char t[]) {
  for (long long i = 1; i <= lens - lent + 1; ++i) {
    bool ok = 1;
    for (long long j = 1; j <= lent; ++j) {
      if (s[i + j - 1] != t[j]) {
        ok = 0;
        break;
      }
    }
    if (ok) return 1;
  }
  return 0;
}
int main() {
  read(n);
  scanf("%s%s", s + 1, t + 1);
  vis[s[1] - 'a'] = vis[s[2] - 'a'] = vis[t[1] - 'a'] = vis[t[2] - 'a'] = 1;
  printf("YES\n");
  if (s[1] == t[2] && s[2] == t[1] && s[1] != s[2]) {
    char o = 'a' ^ 'b' ^ 'c' ^ s[1] ^ s[2];
    for (long long i = 1; i <= n; ++i) putchar(s[1]);
    for (long long i = 1; i <= n; ++i) putchar(o);
    for (long long i = 1; i <= n; ++i) putchar(s[2]);
    return 0;
  }
  if (n >= 2 && vis[0] && vis[1] && vis[2] && (s[1] == t[1] || s[2] == t[2])) {
    if (s[1] == t[1]) {
      for (long long i = 1; i <= n; ++i) putchar(s[2]);
      for (long long i = 1; i <= n; ++i) putchar(t[2]);
      for (long long i = 1; i <= n; ++i) putchar(s[1]);
    } else {
      for (long long i = 1; i <= n; ++i) putchar(s[2]);
      for (long long i = 1; i <= n; ++i) putchar(s[1]);
      for (long long i = 1; i <= n; ++i) putchar(t[1]);
    }
    return 0;
  }
  if (n == 1) {
    for (long long i = 1; i <= 6; ++i) {
      if (!isexist(3, g[i], 2, s) && !isexist(3, g[i], 2, t)) {
        printf("%s", g[i] + 1);
        return 0;
      }
    }
  }
  for (long long i = 1; i <= 6; ++i) {
    if (!isexist(6, m[i], 2, s) && !isexist(6, m[i], 2, t)) {
      for (long long j = 1; j <= n; ++j) printf("%s", g[i] + 1);
      return 0;
    }
  }
  return 0;
}
