#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  map<string, long long> mp;
  string a;
  cin >> a;
  mp[a] = 1;
  string b;
  cin >> b;
  mp[b] = 1;
  string str = "";
  long long ok = 0;
  for (long long i = 0; i < 3; i++) {
    for (long long j = 0; j < 3; j++) {
      for (long long k = 0; k < 3; k++) {
        string ans = "";
        ans += i + 'a';
        ans += j + 'a';
        ans += k + 'a';
        string res = "";
        res += ans[0];
        res += ans[1];
        if (mp[res]) continue;
        res = "";
        res += ans[1];
        res += ans[2];
        if (mp[res]) continue;
        if (n != 1) {
          res = "";
          res += ans[2];
          res += ans[0];
          if (mp[res]) continue;
        }
        if (i != j && j != k && k != i)
          ;
        else
          continue;
        str = ans;
        ok = 1;
        break;
      }
      if (ok) break;
    }
    if (ok) break;
  }
  if (ok) {
    cout << "YES"
         << "\n";
    for (long long i = 0; i < n; i++) cout << str;
    cout << "\n";
  } else {
    cout << "YES"
         << "\n";
    if (b[0] == a[0]) {
      for (long long i = 0; i < n; i++) str += a[1];
      for (long long i = 0; i < n; i++) str += b[1];
      for (long long i = 0; i < n; i++) str += a[0];
    } else if (a[1] == b[1]) {
      for (long long i = 0; i < n; i++) str += a[1];
      for (long long i = 0; i < n; i++) str += b[0];
      for (long long i = 0; i < n; i++) str += a[0];
    } else {
      for (long long i = 0; i < n; i++) str += a[0];
      long long val = 0;
      for (long long j = 0; j < 3; j++) {
        if (j != a[0] - 'a' && j != a[1] - 'a') {
          val = j;
          break;
        }
      }
      for (long long i = 0; i < n; i++) {
        str += val + 'a';
      }
      for (long long i = 0; i < n; i++) str += a[1];
    }
    cout << str << "\n";
  }
  return 0;
}
