#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795;
vector<vector<int> > ans(120, vector<int>(60, 0));
int main() {
  int a, b, c, d, n;
  int x[30];
  int px, py, pn;
  scanf("%d%d%d%d%d\n", &a, &b, &c, &d, &n);
  for (int i = 1; i <= n; i++) scanf("%d", &x[i]);
  if (a % 2 == 1) {
    px = 1;
    py = b + 1;
    pn = 1;
  } else {
    px = 1;
    py = 0;
    pn = 2;
  }
  int k;
  int grx, gry;
  grx = a;
  gry = b;
  for (int i = 1; i <= n; i++) {
    k = 0;
    while (k < x[i]) {
      k++;
      if (pn == 1) {
        py--;
        if (py == 0) {
          py = 1;
          px++;
          pn = 2;
        }
      } else {
        py++;
        if (py == gry + 1) {
          py = gry;
          px++;
          pn = 1;
        }
      }
      if (px == grx + 1) {
        grx = c + a;
        gry = d;
      }
      if (px == a + c + 1) {
        printf("NO");
        return 0;
      }
      ans[px][py] = i;
    }
  }
  printf("YES\n");
  for (int i = 1; i <= max(b, d); i++) {
    for (int j = 1; j <= a + c; j++) {
      if (ans[j][i] == 0)
        printf(".");
      else
        cout << char(ans[j][i] + char('a') - 1);
    }
    printf("\n");
  }
  return 0;
}
