#include <bits/stdc++.h>
const int INF = 2000000005;
const long long BIG_INF = 2000000000000000005;
const int mod = 1000000007;
const int P = 31;
const long double PI = 3.141592653589793238462643;
const double eps = 1e-9;
using namespace std;
vector<pair<int, int> > dir = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
bool valid(int x, int y, int n, int m) {
  return x >= 0 && y >= 0 && x < n && y < m;
}
mt19937 rng(1999999973);
unordered_map<char, bool> taken;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  string s, t;
  cin >> n >> s >> t;
  cout << "YES" << '\n';
  if (s[0] == t[0] && s[0] != s[1] && t[0] != t[1]) {
    if (t[1] == s[1]) {
      taken[s[0]] = true;
      taken[s[1]] = true;
      if (!taken['a']) t[1] = 'a';
      if (!taken['b']) t[1] = 'b';
      if (!taken['c']) t[1] = 'c';
    }
    for (int i = 0; i < n; i++) {
      cout << s[1];
    }
    for (int i = 0; i < n; i++) cout << t[1];
    for (int i = 0; i < n; i++) cout << s[0];
    return 0;
  }
  if (s[0] == t[0]) {
    if (s[1] != s[0]) taken[s[1]] = true;
    if (t[1] != t[0]) taken[t[1]] = true;
    char c2;
    if ('a' != s[0] && !taken['a']) c2 = 'a';
    if ('b' != s[0] && !taken['b']) c2 = 'b';
    if ('c' != s[0] && !taken['c']) c2 = 'c';
    for (int i = 0; i < n; i++) {
      cout << s[0];
      cout << c2;
    }
    char c3;
    if ('a' != s[0] && c2 != 'a') c3 = 'a';
    if ('b' != s[0] && c2 != 'b') c3 = 'b';
    if ('c' != s[0] && c2 != 'c') c3 = 'c';
    for (int i = 0; i < n; i++) {
      cout << c3;
    }
    return 0;
  }
  if (t[1] == t[0] && s[1] == s[0]) {
    for (int i = 0; i < n; i++) cout << "abc";
    return 0;
  }
  char g, c2 = '#';
  if ('a' != s[0] && 'a' != t[0]) g = 'a';
  if ('b' != s[0] && 'b' != t[0]) g = 'b';
  if ('c' != s[0] && 'c' != t[0]) g = 'c';
  if (t[1] == t[0]) taken[t[0]] = true;
  if (s[1] == s[0]) taken[s[0]] = true;
  if (taken['a']) c2 = 'a';
  if (taken['b']) c2 = 'b';
  if (taken['c']) c2 = 'c';
  if (c2 == '#') {
    string cur = "abc";
    bool found = false;
    do {
      bool bad = false;
      if (cur[0] == s[0] && cur[1] == s[1]) bad = true;
      if (cur[0] == t[0] && cur[1] == t[1]) bad = true;
      if (cur[1] == s[0] && cur[2] == s[1]) bad = true;
      if (cur[1] == t[0] && cur[2] == t[1]) bad = true;
      if (!bad) {
        found = true;
        break;
      }
    } while (next_permutation(cur.begin(), cur.end()));
    while (!found) cerr << "shit";
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < n; j++) cout << cur[i];
    }
    return 0;
  }
  for (int i = 0; i < n; i++) cout << g << c2;
  char c3;
  if ('a' != c2 && 'a' != g) c3 = 'a';
  if ('b' != c2 && 'b' != g) c3 = 'b';
  if ('c' != c2 && 'c' != g) c3 = 'c';
  for (int i = 0; i < n; i++) cout << c3;
  return 0;
}
