#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
long long int const maxn = 1e5 + 5;
long long int const inf = 1e18;
long long int add(long long int a, long long int b) {
  return ((a % mod) + (b % mod)) % mod;
}
long long int mul(long long int a, long long int b) {
  return ((a % mod) * (b % mod)) % mod;
}
long long int powm(long long int x, long long int n) {
  long long int result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = (x * x) % mod;
    n = n / 2;
  }
  return result;
}
bool prime(long long int x) {
  if (x < 2) return false;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
string f1(string a, long long int n) {
  string b = "";
  for (int i = 0; i < n; i++) b += a;
  return b;
}
string f2(string a, long long int n) {
  string b = "";
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < n; j++) b += a[i];
  }
  return b;
}
bool check(string s, string a, string b) {
  for (int i = 0; i < s.size() - 1; i++) {
    if ((s[i] == a[0] and s[i + 1] == a[1]) or
        (s[i] == b[0] and s[i + 1] == b[1]))
      return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string A[] = {"abc", "acb", "bac", "bca", "cab", "cba"};
  long long int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  for (int i = 0; i < 6; i++) {
    string s1 = f1(A[i], n);
    string s2 = f2(A[i], n);
    if (check(s1, a, b)) {
      cout << "YES\n";
      cout << s1;
      return 0;
    } else if (check(s2, a, b)) {
      cout << "YES\n";
      cout << s2;
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
