#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s, t;
  int n;
  cin >> n;
  cin >> s >> t;
  if (s[0] != s[1] && t[0] != t[1]) {
    vector<char> order;
    for (int c = ('a'); c <= ('c'); c++) {
      order.push_back(c);
    }
    do {
      string u = string(1, order[0]) + string(1, order[1]);
      string v = string(1, order[1]) + string(1, order[2]);
      if (u == s || u == t || v == s || v == t) {
        continue;
      }
      string ans =
          string(n, order[0]) + string(n, order[1]) + string(n, order[2]);
      cout << "YES"
           << "\n";
      cout << ans << "\n";
      return 0;
    } while (next_permutation(order.begin(), order.end()));
  }
  if (t[0] == t[1]) {
    swap(s, t);
  }
  if (t[0] == t[1]) {
    string ans;
    for (int i = (1); i <= (n); i++) {
      ans += "abc";
    }
    cout << "YES"
         << "\n";
    cout << ans << "\n";
    return 0;
  }
  if (s == "aa") {
    string ans;
    if (t == "ab" || t == "bc" || t == "ba") {
      for (int i = (1); i <= (n); i++) {
        ans += "ac";
      }
      ans += string(n, 'b');
    } else if (t == "ca" || t == "ac" || t == "cb") {
      for (int i = (1); i <= (n); i++) {
        ans += "ab";
      }
      ans += string(n, 'c');
    }
    cout << "YES"
         << "\n";
    cout << ans << "\n";
    return 0;
  } else if (s == "bb") {
    string ans;
    if (t == "bc" || t == "ca" || t == "cb") {
      for (int i = (1); i <= (n); i++) {
        ans += "ba";
      }
      ans += string(n, 'c');
    } else if (t == "ab" || t == "ba" || t == "ac") {
      for (int i = (1); i <= (n); i++) {
        ans += "bc";
      }
      ans += string(n, 'a');
    }
    cout << "YES"
         << "\n";
    cout << ans << "\n";
    return 0;
  } else if (s == "cc") {
    string ans;
    if (t == "ca" || t == "ab" || t == "ac") {
      for (int i = (1); i <= (n); i++) {
        ans += "cb";
      }
      ans += string(n, 'a');
    } else if (t == "bc" || t == "cb" || t == "ba") {
      for (int i = (1); i <= (n); i++) {
        ans += "ca";
      }
      ans += string(n, 'b');
    }
    cout << "YES"
         << "\n";
    cout << ans << "\n";
    return 0;
  }
  cout << "NO"
       << "\n";
  return 0;
}
