#include <bits/stdc++.h>
using std::bitset;
using std::cerr;
using std::cin;
using std::cout;
using std::deque;
using std::endl;
using std::fixed;
using std::ios_base;
using std::make_pair;
using std::make_tuple;
using std::map;
using std::nth_element;
using std::pair;
using std::queue;
using std::reverse;
using std::set;
using std::sort;
using std::stack;
using std::string;
using std::tuple;
using std::unordered_map;
using std::unordered_set;
using std::vector;
int n;
string s, t;
string p;
bool contains(string& x) {
  for (int i = 0; i < (int)p.size() - 1; ++i)
    if (p.substr(i, 2) == x) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  cin >> n >> s >> t;
  p = "abc";
  int cnt = 0;
  bool flag = s[0] == s[1] || t[0] == t[1];
  for (int i = 0; i < 6; ++i) {
    if (flag) p.push_back(p[0]);
    if (!contains(s) && !contains(t)) break;
    if (flag) p.pop_back();
    ++cnt;
    std::next_permutation(p.begin(), p.end());
  }
  assert(cnt < 6);
  cout << "YES\n";
  if (flag) {
    p.pop_back();
    for (int i = 0; i < n; ++i) cout << p;
    cout << '\n';
  } else {
    for (int i = 0; i < 3; ++i)
      for (int j = 0; j < n; ++j) cout << p[i];
    cout << '\n';
  }
  return 0;
}
