#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000;
int m[MAXN][MAXN];
int a, b, c, d, n;
vector<pair<int, int> > v;
int main() {
  scanf("%d%d%d%d%d", &a, &b, &c, &d, &n);
  if (b > d) {
    for (int j = a + c; j >= a + 1; j--) {
      int gao = j - a;
      if (gao & 1)
        for (int i = d; i >= 1; i--) v.push_back(make_pair(i, j));
      else
        for (int i = 1; i <= d; i++) v.push_back(make_pair(i, j));
    }
    for (int j = a; j >= 1; j--) {
      int gao = a - j;
      gao = (gao % 2 + 2) % 2;
      if (!(gao & 1))
        for (int i = 1; i <= b; i++) v.push_back(make_pair(i, j));
      else
        for (int i = b; i >= 1; i--) v.push_back(make_pair(i, j));
    }
  } else {
    for (int j = 1; j <= a; j++) {
      int gao = a - j;
      gao = (gao % 2 + 2) % 2;
      if (gao & 1)
        for (int i = 1; i <= b; i++) v.push_back(make_pair(i, j));
      else
        for (int i = b; i >= 1; i--) v.push_back(make_pair(i, j));
    }
    for (int j = a + 1; j <= a + c; j++) {
      int gao = j - a;
      if (gao & 1)
        for (int i = 1; i <= d; i++) v.push_back(make_pair(i, j));
      else
        for (int i = d; i >= 1; i--) v.push_back(make_pair(i, j));
    }
  }
  int st = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    int ed = st + x;
    for (int j = st; j < ed; j++) {
      int xx = v[j].first, yy = v[j].second;
      m[xx][yy] = i;
    }
    st = ed;
  }
  printf("YES\n");
  for (int i = 1; i <= max(b, d); i++) {
    for (int j = 1; j <= a + c; j++)
      if (m[i][j] == 0)
        printf(".");
      else
        printf("%c", 'a' + m[i][j] - 1);
    printf("\n");
  }
  return 0;
}
