#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> ha(2);
  cin >> ha[0] >> ha[1];
  string a, b;
  sort(ha.begin(), ha.end());
  a = ha[0];
  b = ha[1];
  string ans;
  int P1 = 1, P2 = 2, P3 = 3;
  int f = 0;
  if (a == "ab") {
    if (b == "bc" || b == "cb" || b == "ca") {
      swap(P1, P2);
    } else if (b == "bb" || b == "cc") {
      f = 1;
      P1 = 1;
      P2 = 3;
      P3 = 2;
    } else if (b == "ac") {
      f = 0;
      swap(P1, P3);
    } else {
      f = 0;
      swap(P3, P2);
    }
  } else if (a == "aa") {
    if (b == "ab" || b == "ba") {
      f = 1;
      P1 = 2;
      P2 = 3;
      P3 = 1;
    } else if (b == "bb" || b == "cb" || b == "ac" || b == "cc") {
      f = 2;
      P1 = 1;
      P2 = 2;
      P3 = 3;
    } else {
      f = 2;
      P1 = 1;
      P2 = 3;
      P3 = 2;
    }
  } else if (a == "ac") {
    if (b == "bb" || b == "cc") {
      f = 1;
      P1 = 1;
      P2 = 2;
      P3 = 3;
    } else if (b == "bc") {
      f = 0;
      P1 = 3;
      P2 = 2;
      P3 = 1;
    }
  } else if (a == "ba") {
    if (b == "cc" || b == "bb") {
      f = 1;
      P1 = 1;
      P2 = 2;
      P3 = 3;
    } else if (b == "bc") {
      f = 0;
      P1 = 3;
      P2 = 1;
      P3 = 2;
    }
  } else if (a == "bb") {
    if (b == "ca" || b == "cc") {
      f = 1;
      P1 = 1;
      P2 = 2;
      P3 = 3;
    } else if (b == "bc" || b == "cb") {
      f = 1;
      P1 = 3;
      P2 = 1;
      P3 = 2;
    }
  } else if (a == "bc") {
    if (b == "ca" || b == "cc") {
      f = 2;
      P1 = 1;
      P2 = 3;
      P3 = 2;
    } else {
      f = 0;
      P1 = 2;
      P2 = 1;
      P3 = 3;
    }
  } else if (a == "ca") {
    if (b == "cc") {
      f = 1;
      P1 = 1;
      P2 = 2;
      P3 = 3;
    }
  } else {
    f = 2;
    P1 = 1;
    P2 = 2;
    P3 = 3;
  }
  cout << "YES" << endl;
  if (f == 0) {
    for (int i = 0; i < n; i++) cout << (char)(96 + P1);
    for (int i = 0; i < n; i++) cout << (char)(96 + P2);
    for (int i = 0; i < n; i++) cout << (char)(96 + P3);
  } else if (f == 1) {
    for (int i = 0; i < n; i++) cout << (char)(96 + P1);
    for (int i = 0; i < n; i++) cout << (char)(96 + P2) << (char)(96 + P3);
  } else {
    for (int i = 0; i < n; i++)
      cout << (char)(96 + P1) << (char)(96 + P2) << (char)(96 + P3);
  }
}
