#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, d, x, y, tx, ty, sum;
vector<string> A;
int X[100];
bool ok(int q, int w) {
  if (q < (x - tx) || w >= ty) return true;
  return false;
}
vector<string> solve(int d) {
  int sx = 0, sy = 0, t = 0;
  if (d == 1) {
    t = 1;
    sy = y - 1;
  }
  vector<string> E;
  string s;
  for (int i = 0; i < y; i++) s += '.';
  vector<string> R(x, s);
  int f = 0, p = X[0];
  for (int i = 0; i < sum; i++) {
    if (!ok(sx, sy)) return E;
    R[sx][sy] = char('a' + f);
    p--;
    if (p == 0) {
      f++;
      p = X[f];
    }
    if (t == 0) {
      if (sy == (y - 1)) {
        t = 1;
        sx++;
      } else {
        sy++;
      }
    } else {
      if (sy == 0 || (sx >= (x - tx) && sy == ty)) {
        t = 0;
        sx++;
      } else {
        sy--;
      }
    }
  }
  return R;
}
int main() {
  cin >> a >> b >> c >> d >> n;
  for (int i = 0; i < n; i++) cin >> X[i];
  x = max(b, d);
  y = a + c;
  tx = abs(b - d);
  if (b < d)
    ty = a;
  else
    ty = c;
  sum = 0;
  for (int i = 0; i < n; i++) sum += X[i];
  A = solve(0);
  if (A.empty()) A = solve(1);
  if (A.empty())
    cout << "NO" << endl;
  else {
    if (d < b) {
      for (int i = 0; i < A.size(); i++) reverse(A[i].begin(), A[i].end());
    }
    cout << "YES" << endl;
    for (int i = 0; i < A.size(); i++) cout << A[i] << endl;
  }
  cin >> n;
  return 0;
}
