#include <bits/stdc++.h>
using namespace std;
char zz[64][128];
int main() {
  int a, b, c, d, k;
  cin >> a >> b >> c >> d >> k;
  int n = max(b, d);
  int m = a + c;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) zz[i][j] = '.';
  char z = 'a' - 1;
  for (int x = 0, i = b - 1, j = b % 2 ? 0 : a - 1, h = 0; h < a * b + c * d;
       h++, x--) {
    if (x == 0) {
      cin >> x;
      z++;
    }
    zz[i][j] = z;
    if (j < a) {
      if (i % 2) {
        if (j == 0)
          i--;
        else
          j--;
      } else {
        if (j == a - 1)
          i--;
        else
          j++;
      }
      if (i < 0) i = 0, j = a;
    } else {
      if (i % 2) {
        if (j == a)
          i++;
        else
          j--;
      } else {
        if (j == m - 1)
          i++;
        else
          j++;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << zz[i] << '\n';
  return 0;
}
