#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 500;
const long long mod = 1e9 + 7;
const long long INF = 1LL << 57;
const int M = 1e6 + 500;
vector<string> v;
long long int n;
string s, t;
bool ok = 0;
void complete1(string x) {
  string temp = "";
  for (int k = 0; k < 3; k++) {
    for (int i = 0; i < n; i++) temp += x[k];
  }
  if (temp.find(s) == -1 && temp.find(t) == -1) {
    cout << "YES" << endl;
    cout << temp << endl;
    ok = 1;
    return;
  }
}
void complete(string x) {
  string temp = "";
  for (int i = 0; i < n; i++) {
    temp += x;
  }
  if (temp.find(s) == -1 && temp.find(t) == -1) {
    cout << "YES" << endl;
    cout << temp << endl;
    ok = 1;
    return;
  }
}
void solve() {
  cin >> n;
  cin >> s >> t;
  string x;
  x = "abc";
  complete(x);
  if (ok) return;
  x = "acb";
  complete(x);
  if (ok) return;
  x = "bac";
  complete(x);
  if (ok) return;
  x = "bca";
  complete(x);
  if (ok) return;
  x = "cab";
  complete(x);
  if (ok) return;
  x = "cba";
  complete(x);
  if (ok) return;
  x = "abc";
  complete1(x);
  if (ok) return;
  x = "acb";
  complete1(x);
  if (ok) return;
  x = "bac";
  complete1(x);
  if (ok) return;
  x = "bca";
  complete1(x);
  if (ok) return;
  x = "cab";
  complete1(x);
  if (ok) return;
  x = "cba";
  complete1(x);
  if (ok) return;
  cout << "NO" << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
