#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void solve(ll n, string s, string t) {
  string res = "abc";
  ll d = 3;
  if (n == 1) d = 2;
  do {
    bool ok = true;
    string tmp = res + res;
    for (ll i = 0; i < d; i++) {
      ok &= (tmp[i] != s[0]) || (tmp[i + 1] != s[1]);
      ok &= (tmp[i] != t[0]) || (tmp[i + 1] != t[1]);
    }
    if (ok) {
      cout << "YES" << endl;
      for (ll i = 0; i < n; i++) {
        cout << res;
      }
      cout << endl;
      return;
    }
  } while (next_permutation(begin(res), end(res)));
  if (s[0] == t[0]) {
    cout << "YES" << endl;
    for (char c : {'a', 'b', 'c'}) {
      if (c != s[0]) {
        cout << string(n, c);
      }
    }
    cout << string(n, s[0]) << endl;
    return;
  }
  if (s[1] == t[1]) {
    cout << "YES" << endl;
    cout << string(n, s[1]);
    for (char c : {'a', 'b', 'c'}) {
      if (c != s[1]) {
        cout << string(n, c);
      }
    }
    cout << endl;
    return;
  }
  reverse(begin(t), end(t));
  if (s == t) {
    cout << "YES" << endl;
    cout << string(n, s[0]);
    for (char c : {'a', 'b', 'c'}) {
      if (c != s[0] && c != s[1]) {
        cout << string(n, c);
      }
    }
    cout << string(n, s[1]) << endl;
    return;
  }
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n;
  string s, t;
  while (cin >> n >> s >> t) {
    solve(n, s, t);
  }
}
