#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, n, num, itx = 0, ity = 0;
  scanf("%d %d %d %d %d", &a, &b, &c, &d, &n);
  string aux(a + c, '.');
  vector<string> v(max(b, d), aux);
  bool up = false;
  if (a & 1) {
    itx = b - 1;
    ity = 0;
    up = true;
  }
  int tope = b;
  char ch = 'a';
  for (int i = (0), _i = (n); i < _i; ++i) {
    scanf("%d", &num);
    for (int jo = (0), _jo = (num); jo < _jo; ++jo) {
      v[itx][ity] = ch;
      if (up) {
        itx--;
        if (itx < 0) {
          itx = 0;
          ity++;
          up = false;
        }
      } else {
        itx++;
        if (ity >= a) tope = d;
        if (itx >= tope) {
          itx = tope - 1;
          ity++;
          up = true;
        }
      }
    }
    ch++;
  }
  printf("YES\n");
  for (int i = (0), _i = (v.size()); i < _i; ++i) cout << v[i] << endl;
}
