#include <bits/stdc++.h>
using namespace std;
int X[26];
char ans[100][100];
bool ok(int x, int y) {
  return (x >= 0 && x < 100 && y >= 0 && y < 100 && ans[x][y] != '.');
}
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 < n; i++) scanf("%d", &X[i]);
  for (int i = 0; i < 100; i++)
    for (int j = 0; j < 100; j++) ans[i][j] = '.';
  for (int i = 0; i < b; i++)
    for (int j = 0; j < a; j++) ans[i][j] = '#';
  for (int i = 0; i < d; i++)
    for (int j = 0; j < c; j++) ans[i][j + a] = '#';
  int dir, x, y;
  if (a % 2 == 0) {
    x = y = 0;
    dir = 1;
  } else {
    x = b - 1;
    y = 0;
    dir = -1;
  }
  int col = 0;
  int cnt = 0;
  for (int i = 0; i < a * b + c * d; i++) {
    ans[x][y] = col + 'a';
    cnt++;
    if (cnt == X[col]) col++, cnt = 0;
    if (ok(x + dir, y))
      x += dir;
    else
      y++, dir *= -1;
  }
  puts("YES");
  for (int i = 0; i < max(b, d); i++) {
    for (int j = 0; j < a + c; j++) printf("%c", ans[i][j]);
    puts("");
  }
  return 0;
}
