#include <bits/stdc++.h>
using namespace std;
vector<int> x;
int abs(int n) { return n >= 0 ? n : -n; }
int main() {
  int a, b, c, d, n;
  cin >> a >> b >> c >> d >> n;
  x.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> x[i];
  }
  string s;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < x[i]; j++) {
      s.push_back('a' + i);
    }
  }
  vector<string> ans;
  int mxb = b > d ? b : d;
  int mnb = b > d ? d : b;
  int mna = b > d ? a : c;
  for (int i = 0; i < mnb; i++) {
    ans.push_back(s.substr((a + c) * i, a + c));
  }
  for (int i = 0; i < abs(b - d); i++) {
    ans.push_back(s.substr((a + c) * mnb + mna * i, mna));
  }
  if (b > d) {
    if (d % 2 == 0) {
      for (int i = 1; i < b; i += 2) {
        reverse(ans[i].begin(), ans[i].end());
      }
    } else {
      for (int i = 0; i < b; i += 2) {
        reverse(ans[i].begin(), ans[i].end());
      }
    }
    for (int i = d; i < b; i++) {
      for (int j = 0; j < c; j++) {
        ans[i].push_back('.');
      }
    }
  } else {
    if (b % 2 == 1) {
      for (int i = 1; i < d; i += 2) {
        reverse(ans[i].begin(), ans[i].end());
      }
    } else {
      for (int i = 0; i < d; i += 2) {
        reverse(ans[i].begin(), ans[i].end());
      }
    }
    for (int i = b; i < d; i++) {
      for (int j = 0; j < a; j++) {
        ans[i].insert(0, 1, '.');
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
}
