#include <bits/stdc++.h>
using namespace std;
const int nmax = 110;
int x[nmax];
char g[nmax][nmax];
int pos[nmax * nmax][2];
int main() {
  int a, b, c, d;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  int q;
  scanf("%d", &q);
  for (int i = 0; i < q; ++i) {
    scanf("%d", &x[i]);
  }
  bool swapped = false;
  if (b < d) {
    swap(b, d);
    swap(a, c);
    swapped = true;
  }
  int n = b;
  int m = a + c;
  memset(g, '.', sizeof(g));
  int k = 0;
  for (int j = 0; j < m; ++j) {
    if (((j ^ a) & 1) == 0) {
      for (int i = 0; i < (j < a ? b : d); ++i) {
        pos[k][0] = i;
        pos[k][1] = j;
        ++k;
      }
    } else {
      for (int i = (j < a ? b : d) - 1; i >= 0; --i) {
        pos[k][0] = i;
        pos[k][1] = j;
        ++k;
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i < q; ++i) {
    for (int j = 0; j < x[i]; ++j) {
      g[pos[cnt][0]][pos[cnt][1]] = 'a' + (char)i;
      ++cnt;
    }
  }
  if (swapped) {
    for (int i = 0; i < n; ++i) {
      reverse(g[i], g[i] + m);
    }
  }
  puts("YES");
  for (int i = 0; i < n; ++i) {
    g[i][m] = 0;
    puts(g[i]);
  }
  return 0;
}
