#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, n;
  cin >> a >> b >> c >> d >> n;
  if (a * b + c * d < n) {
    cout << "NO\n";
    return 0;
  }
  vector<string> v;
  vector<char> v2;
  for (long long i = 0; i < max(b, d); i++) {
    v.push_back(string(a + c, '.'));
  }
  char c2 = 'a';
  for (long long i = 0; i < n; i++, c2++) {
    long long x2;
    cin >> x2;
    for (long long j = 0; j < x2; j++) {
      v2.push_back(c2);
    }
  }
  long long turn = 0;
  if (d % 2 == 0) turn++;
  while (d--) {
    if (v2.empty()) break;
    if (turn) {
      for (long long i = a; i < a + c; i++) {
        v[d][i] = v2.back();
        v2.pop_back();
      }
    } else {
      for (long long i = a + c - 1; i >= a; i--) {
        v[d][i] = v2.back();
        v2.pop_back();
      }
    }
    turn++;
    turn %= 2;
  }
  turn++;
  turn %= 2;
  for (long long i = 0; i < b; i++, turn++, turn %= 2) {
    if (v2.empty()) break;
    if (turn) {
      for (long long j = 0; j < a; j++) {
        v[i][j] = v2.back();
        v2.pop_back();
      }
    } else {
      for (long long j = a - 1; j >= 0; j--) {
        v[i][j] = v2.back();
        v2.pop_back();
      }
    }
  }
  cout << "YES\n";
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << endl;
  }
}
