#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  char ch1, ch2, ch3, ch4;
  scanf("%d\n", &n);
  scanf("%c%c\n%c%c", &ch1, &ch2, &ch3, &ch4);
  if (ch1 != ch2 && ch3 != ch4) {
    if ((ch1 == 'a' && ch2 == 'b') || (ch1 == 'b' && ch2 == 'c') ||
        (ch3 == 'a' && ch4 == 'b') || (ch3 == 'b' && ch4 == 'c')) {
      if ((ch1 == 'a' && ch2 == 'c') || (ch1 == 'c' && ch2 == 'b') ||
          (ch3 == 'a' && ch4 == 'c') || (ch3 == 'c' && ch4 == 'b')) {
        if ((ch1 == 'b' && ch2 == 'a') || (ch1 == 'a' && ch2 == 'c') ||
            (ch3 == 'b' && ch4 == 'a') || (ch3 == 'a' && ch4 == 'c')) {
          if ((ch1 == 'b' && ch2 == 'c') || (ch1 == 'c' && ch2 == 'a') ||
              (ch3 == 'b' && ch4 == 'c') || (ch3 == 'c' && ch4 == 'a')) {
            if ((ch1 == 'c' && ch2 == 'a') || (ch1 == 'a' && ch2 == 'b') ||
                (ch3 == 'c' && ch4 == 'a') || (ch3 == 'a' && ch4 == 'b')) {
              if ((ch1 == 'c' && ch2 == 'b') || (ch1 == 'b' && ch2 == 'a') ||
                  (ch3 == 'c' && ch4 == 'b') || (ch3 == 'b' && ch4 == 'a'))
                printf("NO\n");
              else {
                printf("YES\n");
                for (i = 1; i <= n; i++) printf("c");
                for (i = 1; i <= n; i++) printf("b");
                for (i = 1; i <= n; i++) printf("a");
              }
            } else {
              printf("YES\n");
              for (i = 1; i <= n; i++) printf("c");
              for (i = 1; i <= n; i++) printf("a");
              for (i = 1; i <= n; i++) printf("b");
            }
          } else {
            printf("YES\n");
            for (i = 1; i <= n; i++) printf("b");
            for (i = 1; i <= n; i++) printf("c");
            for (i = 1; i <= n; i++) printf("a");
          }
        } else {
          printf("YES\n");
          for (i = 1; i <= n; i++) printf("b");
          for (i = 1; i <= n; i++) printf("a");
          for (i = 1; i <= n; i++) printf("c");
        }
      } else {
        printf("YES\n");
        for (i = 1; i <= n; i++) printf("a");
        for (i = 1; i <= n; i++) printf("c");
        for (i = 1; i <= n; i++) printf("b");
      }
    } else {
      printf("YES\n");
      for (i = 1; i <= n; i++) printf("a");
      for (i = 1; i <= n; i++) printf("b");
      for (i = 1; i <= n; i++) printf("c");
    }
  } else {
    printf("YES\n");
    if (ch3 == ch4) {
      swap(ch1, ch3);
      swap(ch2, ch4);
    }
    if (ch3 == ch1 || ch4 == ch1) {
      if (ch1 == 'a') {
        if (ch3 == ch1) {
          if (ch4 == 'b') {
            for (i = 1; i <= 2 * n; i += 2) printf("ac");
            for (i = 1; i <= n; i++) printf("b");
          } else {
            for (i = 1; i <= 2 * n; i += 2) printf("ab");
            for (i = 1; i <= n; i++) printf("c");
          }
        } else {
          if (ch3 == 'b') {
            for (i = 1; i <= 2 * n; i += 2) printf("ac");
            for (i = 1; i <= n; i++) printf("b");
          } else {
            for (i = 1; i <= 2 * n; i += 2) printf("ab");
            for (i = 1; i <= n; i++) printf("c");
          }
        }
      } else {
        if (ch1 == 'b') {
          if (ch3 == ch1) {
            if (ch4 == 'a') {
              for (i = 1; i <= 2 * n; i += 2) printf("bc");
              for (i = 1; i <= n; i++) printf("a");
            } else {
              for (i = 1; i <= 2 * n; i += 2) printf("ba");
              for (i = 1; i <= n; i++) printf("c");
            }
          } else {
            if (ch3 == 'a') {
              for (i = 1; i <= 2 * n; i += 2) printf("bc");
              for (i = 1; i <= n; i++) printf("a");
            } else {
              for (i = 1; i <= 2 * n; i += 2) printf("ba");
              for (i = 1; i <= n; i++) printf("c");
            }
          }
        } else {
          if (ch3 == ch1) {
            if (ch4 == 'a') {
              for (i = 1; i <= 2 * n; i += 2) printf("cb");
              for (i = 1; i <= n; i++) printf("a");
            } else {
              for (i = 1; i <= 2 * n; i += 2) printf("ca");
              for (i = 1; i <= n; i++) printf("b");
            }
          } else {
            if (ch3 == 'a') {
              for (i = 1; i <= 2 * n; i += 2) printf("cb");
              for (i = 1; i <= n; i++) printf("a");
            } else {
              for (i = 1; i <= 2 * n; i += 2) printf("ca");
              for (i = 1; i <= n; i++) printf("b");
            }
          }
        }
      }
    } else {
      if (ch3 != ch4) {
        for (i = 1; i <= n; i++) printf("%c", ch3);
        for (i = 1; i <= 2 * n; i += 2) printf("%c%c", ch1, ch4);
      } else {
        for (i = 1; i <= 2 * n; i += 2) printf("%c%c", ch1, ch3);
        if (ch1 != 'a' && ch3 != 'a')
          for (i = 1; i <= n; i++) printf("a");
        else {
          if (ch1 != 'b' && ch3 != 'b')
            for (i = 1; i <= n; i++) printf("b");
          else {
            if (ch1 != 'c' && ch3 != 'c')
              for (i = 1; i <= n; i++) printf("c");
          }
        }
      }
    }
  }
  return 0;
}
