#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
int a, b, c, d, n;
int arr[MAXN * MAXN];
int maze[MAXN][MAXN];
int main() {
  memset(maze, -1, sizeof(maze));
  scanf("%d%d%d%d%d", &a, &b, &c, &d, &n);
  int tot = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    for (int j = tot + 1; j <= tot + x; j++) arr[j] = i;
    tot += x;
  }
  int now = 0, fg = 0;
  if (b % 2 == 1) {
    for (int i = b; i >= 1; i--) {
      if ((b - i) % 2 == 0) {
        for (int j = 1; j <= a; j++) maze[i][j] = arr[++now];
      } else {
        for (int j = a; j >= 1; j--) maze[i][j] = arr[++now];
      }
    }
  } else {
    for (int i = b; i >= 1; i--) {
      if ((b - i) % 2 == 1) {
        for (int j = 1; j <= a; j++) maze[i][j] = arr[++now];
      } else {
        for (int j = a; j >= 1; j--) maze[i][j] = arr[++now];
      }
    }
  }
  for (int i = 1; i <= d; i++) {
    if (i % 2 == 1) {
      for (int j = a + 1; j <= a + c; j++) maze[i][j] = arr[++now];
    } else {
      for (int j = a + c; j >= a + 1; j--) maze[i][j] = arr[++now];
    }
  }
  puts("YES");
  for (int i = 1; i <= max(b, d); i++) {
    for (int j = 1; j <= a + c; j++) {
      if (maze[i][j] == -1)
        printf(".");
      else
        printf("%c", maze[i][j] + 'a');
    }
    puts("");
  }
  return 0;
}
