#include <bits/stdc++.h>
using namespace std;
bool isit(string &str, string &a, string &b) {
  long long n = str.size();
  for (long long i = 0; i + 1 < n; i++) {
    if ((str[i] == a[0] && str[i + 1] == a[1]) ||
        (str[i] == b[0] && str[i + 1] == b[1])) {
      return 0;
    }
  }
  return 1;
}
int32_t main() {
  long long n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  string check = "abcabc";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "abc";
    }
    return 0;
  }
  check = "acbacb";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "acb";
    }
    return 0;
  }
  check = "bacbac";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "bac";
    }
    return 0;
  }
  check = "bcabca";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "bca";
    }
    return 0;
  }
  check = "cabcab";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "cab";
    }
    return 0;
  }
  check = "cbacba";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << "cba";
    }
    return 0;
  }
  check = "aabbcc";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    return 0;
  }
  check = "aaccbb";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    return 0;
  }
  check = "bbaacc";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    return 0;
  }
  check = "bbccaa";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    return 0;
  }
  check = "ccaabb";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    return 0;
  }
  check = "ccbbaa";
  if (isit(check, a, b)) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) {
      cout << 'c';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'b';
    }
    for (long long i = 0; i < n; i++) {
      cout << 'a';
    }
    return 0;
  }
  cout << "NO"
       << "\n";
}
