#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
const long long mod = (long long)1e9 + 7;
using namespace std;
template <class T>
void smin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void smax(T& a, T val) {
  if (a < val) a = val;
}
const long long N = 5 * (long long)1e5 + 10;
long long n;
vector<char> v;
bool check(string ans, string s) {
  for (long long i = 0; i + 1 < (long long)(ans.size()); ++i) {
    string tt(1, ans[i]);
    tt += ans[i + 1];
    if (tt == s) return 0;
  }
  return 1;
}
string s, t;
void proceed(string ans) {
  if (check(ans, s) and check(ans, t)) {
    cout << "YES" << '\n';
    cout << ans;
    exit(0);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  cin >> s >> t;
  v.push_back('a');
  v.push_back('b');
  v.push_back('c');
  do {
    string ans = "";
    for (long long i = 0; i < 3 * n; ++i) ans += v[i % 3];
    proceed(ans);
    ans = "";
    for (long long i = 0; i < 3; ++i)
      for (long long j = 0; j < n; ++j) ans += v[i];
    proceed(ans);
  } while (next_permutation(v.begin(), v.end()));
  cout << "NO";
  return 0;
}
