#include <bits/stdc++.h>
using namespace std;
using ld = long double;
using ll = long long;
bool r;
int a, b, c, d, n;
void next(int &x, int &y) {
  y += (r ? 1 : -1);
  if (y == 0) {
    x++;
    y = 1;
    r = !r;
  } else if (y == a + c + 1) {
    x++;
    y = a + c;
    r = !r;
  } else if (b <= d && x > b && y == a) {
    x++;
    y = a + 1;
    r = !r;
  } else if (d <= b && x > d && y == a + 1) {
    x++;
    y = a;
    r = !r;
  }
}
int main() {
  cout.precision(20);
  ios_base::sync_with_stdio(false);
  cin >> a >> b >> c >> d >> n;
  if (b <= d && min(d, b) % 2 == 1) {
    r = true;
  } else if (b <= d && min(d, b) % 2 == 0) {
    r = false;
  } else if (d <= b && min(d, b) % 2 == 1) {
    r = false;
  } else if (d <= b && min(d, b) % 2 == 0) {
    r = true;
  }
  int x = 1, y = 1;
  if (!r) {
    y = a + c;
  }
  vector<vector<char>> v(max(b, d), vector<char>(a + c, '.'));
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    while (t) {
      v[x - 1][y - 1] = i + 'a';
      t--;
      next(x, y);
    }
  }
  cout << "YES" << endl;
  for (const auto &i : v) {
    for (auto j : i) {
      cout << j;
    }
    cout << "\n";
  }
}
