#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<bool> pre(6, true);
  string s;
  cin >> s;
  if (s == "ab")
    pre[0] = false;
  else if (s == "ac")
    pre[1] = false;
  else if (s == "ba")
    pre[2] = false;
  else if (s == "bc")
    pre[3] = false;
  else if (s == "ca")
    pre[4] = false;
  else if (s == "cb")
    pre[5] = false;
  cin >> s;
  if (s == "ab")
    pre[0] = false;
  else if (s == "ac")
    pre[1] = false;
  else if (s == "ba")
    pre[2] = false;
  else if (s == "bc")
    pre[3] = false;
  else if (s == "ca")
    pre[4] = false;
  else if (s == "cb")
    pre[5] = false;
  string mask;
  if (pre[0] && pre[3] && pre[4])
    mask = "abc";
  else if (pre[1] && pre[5] && pre[2])
    mask = "acb";
  else if (pre[2] && pre[1] && pre[5])
    mask = "bac";
  else if (pre[3] && pre[4] && pre[0])
    mask = "bca";
  else if (pre[4] && pre[0] && pre[3])
    mask = "cab";
  else if (pre[5] && pre[2] && pre[1])
    mask = "cba";
  cout << "YES\n";
  if (mask.empty()) {
    string ans;
    if (pre[0] && pre[3]) {
      for (int i = 0; i < n; i++) ans += "a";
      for (int i = 0; i < n; i++) ans += "b";
      for (int i = 0; i < n; i++) ans += "c";
    } else if (pre[1] && pre[5]) {
      for (int i = 0; i < n; i++) ans += "a";
      for (int i = 0; i < n; i++) ans += "c";
      for (int i = 0; i < n; i++) ans += "b";
    } else if (pre[2] && pre[1]) {
      for (int i = 0; i < n; i++) ans += "b";
      for (int i = 0; i < n; i++) ans += "a";
      for (int i = 0; i < n; i++) ans += "c";
    } else if (pre[3] && pre[4]) {
      for (int i = 0; i < n; i++) ans += "b";
      for (int i = 0; i < n; i++) ans += "c";
      for (int i = 0; i < n; i++) ans += "a";
    } else if (pre[4] && pre[0]) {
      for (int i = 0; i < n; i++) ans += "c";
      for (int i = 0; i < n; i++) ans += "a";
      for (int i = 0; i < n; i++) ans += "b";
    } else if (pre[5] && pre[2]) {
      for (int i = 0; i < n; i++) ans += "c";
      for (int i = 0; i < n; i++) ans += "b";
      for (int i = 0; i < n; i++) ans += "a";
    }
    cout << ans;
  } else {
    string ans;
    while (n--) {
      ans += mask;
    }
    cout << ans;
  }
}
