#include <bits/stdc++.h>
using namespace std;
vector<string> mat;
int dr[4] = {0, -1, 1, 0};
int dc[4] = {1, 0, 0, -1};
bool valid(const int r, const int c) {
  return (r >= 0 && r < mat.size() && c >= 0 && c < mat[0].size());
}
int lst_r = -1, lst_c = -1;
void solve(const int r, const int c, const int cnt, const char smbl) {
  if (cnt <= 0) {
    lst_r = r;
    lst_c = c;
    return;
  }
  mat[r][c] = smbl;
  for (int d = 0; d < 4; ++d) {
    int x = dr[d] + r, y = dc[d] + c;
    if (valid(x, y) && mat[x][y] == '#') {
      solve(x, y, cnt - 1, smbl);
      break;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int a, b, c, d, n;
  cin >> a >> b >> c >> d >> n;
  mat.assign(max(b, d), string(a + c, '.'));
  for (int i = 0; i < b; ++i) {
    for (int j = 0; j < a; ++j) {
      mat[i][j] = '#';
    }
  }
  for (int i = 0; i < d; ++i) {
    for (int j = a; j < mat[i].size(); ++j) {
      mat[i][j] = '#';
    }
  }
  lst_c = a + c - 1;
  lst_r = (c & 1) ? d - 1 : 0;
  cout << "YES\n";
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    solve(lst_r, lst_c, x, i + 'a');
  }
  for (int i = 0; i < mat.size(); ++i) {
    cout << mat[i] << '\n';
  }
  return 0;
}
