#include <bits/stdc++.h>
using namespace std;
char s[105][105];
int main(void) {
  int a, b, c, d, n;
  scanf("%d%d%d%d%d", &a, &b, &c, &d, &n);
  for (int i = 0; i < max(b, d); i++) memset(s[i], '.', a + c);
  int x = 0, y = 0, dy = 1;
  if (a % 2 == 1) {
    y = b - 1;
    dy = -1;
  }
  for (int i = 0; i < n; i++) {
    int t;
    scanf("%d", &t);
    while (t--) {
      s[y][x] = 'a' + i;
      y += dy;
      if (y < 0) {
        y = 0;
        x++;
        dy = 1;
      } else if (y >= (x >= a ? d : b)) {
        x++;
        y = (x >= a ? d : b) - 1;
        dy = -1;
      }
    }
  }
  puts("YES");
  for (int i = 0; i < max(b, d); i++) puts(s[i]);
  return 0;
}
