#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, idx;
  cin >> n;
  string s, t;
  cin >> s;
  cin >> t;
  vector<string> v;
  v.push_back("ab");
  v.push_back("ac");
  v.push_back("ba");
  v.push_back("bc");
  v.push_back("ca");
  v.push_back("cb");
  long long mark[6] = {0};
  vector<pair<long long, long long> > ans;
  ans.push_back({0, 3});
  ans.push_back({1, 5});
  ans.push_back({2, 1});
  ans.push_back({3, 4});
  ans.push_back({4, 0});
  ans.push_back({5, 2});
  cout << "YES" << endl;
  if (s[0] == s[1] || t[0] == t[1]) {
    if (s[0] == s[1]) {
      if (t == "ab" || t == "bc" || t == "ca") {
        for (long long i = 0; i < n; i++) cout << "acb";
      } else if (t == "ac" || t == "ba" || t == "cb") {
        for (long long i = 0; i < n; i++) cout << "abc";
      } else
        for (long long i = 0; i < n; i++) cout << "abc";
    } else {
      if (s == "ab" || s == "bc" || s == "ca") {
        for (long long i = 0; i < n; i++) cout << "acb";
      } else if (s == "ac" || s == "ba" || s == "cb") {
        for (long long i = 0; i < n; i++) cout << "abc";
      } else
        for (long long i = 0; i < n; i++) cout << "abc";
    }
  } else {
    for (long long i = 0; i < 6; i++)
      if (s == v[i]) mark[i] = 1;
    for (long long i = 0; i < 6; i++)
      if (t == v[i]) mark[i] = 1;
    idx = -1;
    for (long long i = 0; i < 6; i++) {
      if (mark[ans[i].first] || mark[ans[i].second])
        continue;
      else {
        idx = i;
        break;
      }
    }
    for (long long i = 0; i < n; i++) cout << v[ans[idx].first][0];
    for (long long i = 0; i < n; i++) cout << v[ans[idx].second][0];
    for (long long i = 0; i < n; i++) cout << v[ans[idx].second][1];
  }
}
