#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    sort(all(x));
    int i=0;
    bool tp=1;
    int j=n-1;
    if(b>d){
        for(int co=a+c-1;co>=0;co--){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }else{
         for(int co=0;co<a+c-1;co++){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    sort(all(x));
    int i=0;
    bool tp=1;
    int j=n-1;
    for(int co=a+c-1;co>=0;co--){
        while(x[j].f && j>=0){
            if(i==-1){
                tp=1;
                i=0;
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            A[i][co]=char(x[j].s+'a');
            if(tp) i++;
            else i--;
            x[j].f--;
            if(!x[j].f)j--;
//            debug()<<imie(A);
        }
//        if(!x[j]) j--;
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    sort(all(x));
    int i=0;
    bool tp=1;
    int j=n-1;
    if(b>d){
        for(int co=a+c-1;co>=0;co--){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }else{
         for(int co=0;co<a+c;co++){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<int>x(n);
    for(auto &z : x) cin>>z;
    int i=0;
    bool tp=1;
    int j=n-1;
    for(int co=a+c-1;co>=0;co--){
        while(x[j] && j>=0){
            if(i==-1){
                tp=1;
                i=0;
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            A[i][co]=char(j+'a');
            if(tp) i++;
            else i--;
            x[j]--;
            if(!x[j])j--;
//            debug()<<imie(A);
        }
//        if(!x[j]) j--;
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    pii psd;
    sort(all(x));
    psd=x.back();x.pop_back();
    sort(rall(x));
    auto how=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                if(A[j][co]=='.') kl++;
            }
        }
        return kl;
    };
    auto rev=[&](int l,int r){
        int kl=0;
        for(int co=r;co>=l;co--){
            for(int j=0;j<d/2;j++){
                swap(A[j][co],A[d-j-1][co]);
            }
        }
        return kl;
    };
    int i=0;
    bool tp=1;
    int j=n-2;
    bool ok=0;
    if(how()<=psd.f){
        x.insert(x.begin()+n-1,psd);
        j++;
        psd.f=0;
    }
    for(int co=a+c-1;co>=0;co--){
        while(x[j].f && j>=0){
            if(i==-1){
                tp=1;
                i=0;
//                debug()<<imie(co)<<imie(a);
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                if((co)==a) tp=1,i=0;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                if((co)==a) tp=1,i=0;
                break;
            }
            A[i][co]=char(x[j].s+'a');
            if(tp) i++;
            else i--;
            x[j].f--;
            if(!x[j].f){
                if(how()<=psd.f && psd.f){
                    if(tp==1) ok=1;
                    x.insert(x.begin()+j,psd);
                    psd.f=0;
                }
                else j--;
            }
        }
    }
    if(ok) rev(a,a+c-1);
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include <iostream>
#include <queue>

using namespace std;

queue<int> v;

char res[200][200];
int main(){
    int a, b, c, d, n;
    cin >> a >> b >> c >> d >> n;

    for(int i = 0; i < n ; i++){
        int a;
        cin >> a;

        v.push(a);
    }

    int pas = 0;
    int cont = 0;

    bool sw = true;

    if(b % 2 != 0){
        sw = false;
    }

    for(int i = b - 1; i >= 0; i--){
        if(sw){
            for(int j = a - 1; j >= 0; j--){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = false;
        }else{
            for(int j = 0; j < a; j++){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = true;
        }
    }

    sw = false;

    for(int i = 0; i < d; i++){
        if(sw){
            for(int j = a + c - 1; j >= a; j--){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = false;
        }else{
            for(int j = a; j < c + a; j++){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = true;
        }
    }

    cout << "YES" << endl;

    for(int i = 0; i < max(b,d); i++){
        for(int j = 0; j < a+c; j++){
            if(res[i][j] == 0){
                cout << ".";
            }else{
                cout << res[i][j] << "";
            }
        }
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <queue>

using namespace std;

queue<int> v;

char res[60][60];
int main(){
    int a, b, c, d, n;
    cin >> a >> b >> c >> d >> n;

    for(int i = 0; i < n ; i++){
        int a;
        cin >> a;

        v.push(a);
    }

    int pas = 0;
    int cont = 0;

    bool sw = true;

    if(b % 2 != 0){
        sw = false;
    }

    for(int i = b - 1; i >= 0; i--){
        if(sw){
            for(int j = a - 1; j >= 0; j--){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = false;
        }else{
            for(int j = 0; j < a; j++){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = true;
        }
    }

    sw = false;

    for(int i = 0; i < d; i++){
        if(sw){
            for(int j = a + c - 1; j >= a; j--){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = false;
        }else{
            for(int j = a; j < c + a; j++){
                res[i][j] = 'a' + cont;
                pas++;
                if(pas == v.front()){
                    v.pop();
                    pas = 0;
                    cont++;
                }
            }
            sw = true;
        }
    }

    cout << "YES" << endl;

    for(int i = 0; i < max(b,d); i++){
        for(int j = 0; j < a+c; j++){
            if(res[i][j] == 0){
                cout << ".";
            }else{
                cout << res[i][j] << "";
            }
        }
        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#pragma GCC optimize(3)
#define ll long long
#define pb push_back
#define F first
#define S second
#define all(c)  c.begin(), c.end()
#define rep(i,n) for(int i=0 ; i<n ; i++)
#define llv vector< ll >
#define mp make_pair
#define endl "\n"
#define N (ll)2e5+10
#define M (ll)1e18
#define matrix vector<vector<ll> >
#define sz(x) (int)x.size()

int main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios::sync_with_stdio(0);

    int a , b , c , d , n  , i , j ;
    cin >> a >> b >> c >> d >> n ;

    char s[max(b,d)][a+c] ;
    for(i=0 ; i<max(b,d) ; i++){
    	for(j=0 ; j<a+c ; j++){
    		 s[i][j] = '-' ;
    	}
    }
    if(b<d){
    	for(i=b ; i<d ; i++){
           for(j=0 ; j<a ; j++){
           	    s[i][j] = '.' ;
           }
    	}
    }else {
    	 for(i=d ; i<b ; i++){
    	 	 for(j=a ; j<a+c ; j++){
    	 	 	 s[i][j] = '.' ;
    	 	 }
    	 }
    }

    int x , k=0;
    char alpha ;
    bool inc=1 ;
    i=0 ;
    if(b>d){
       if(d%2){
       	j=a+c-1 ;
        inc=0 ;
       }else j=0 ;
    }else {
       if(b%2==0){
       	j=a+c-1 ;
       	inc=0 ;
       }
       else j=0 ;
    }
    while(n--){
    	 cin >> x ;
    	 alpha = 'a' + k++ ;

         while(x--){
         	if(inc){
         		if(s[i][j]=='.'){
         			i++ ; j-- ; inc=0 ; x++ ;
         			continue ;
         		}
         		s[i][j] = alpha ;
         		j++ ;
         		if(j==a+c){
         			i++ ; j-- ;
         			inc=0 ;
         		}
         	}else{
         		 if(s[i][j]=='.'){
         		 	 i++ ;  j++ ;  x++ ;  inc=1 ;
         		 	 continue ;
         		 }
         		 s[i][j] = alpha ;
         		 j-- ;
         		 if(j<0){
         		 	 i++ ; j=0 ;
         		 	 inc=1 ;
         		 }
         	}
         }
    }

    cout << "YES" << endl ;
    for(i=0 ; i<max(b,d) ; i++){
       for(j=0 ; j<a+c ; j++){
       	  cout << s[i][j] ;
       }
       cout << endl ;
    }

     return 0 ;
 }


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#pragma GCC optimize(3)
#define ll long long
#define pb push_back
#define F first
#define S second
#define all(c)  c.begin(), c.end()
#define rep(i,n) for(int i=0 ; i<n ; i++)
#define llv vector< ll >
#define mp make_pair
#define endl "\n"
#define N (ll)2e5+10
#define M (ll)1e18
#define matrix vector<vector<ll> >
#define sz(x) (int)x.size()

int main(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios::sync_with_stdio(0);

    int a , b , c , d , n  , i , j ;
    cin >> a >> b >> c >> d >> n ;

    char s[max(b,d)][a+c] ;
    for(i=0 ; i<max(b,d) ; i++){
    	for(j=0 ; j<a+c ; j++){
    		 s[i][j] = '-' ;
    	}
    }
    if(b<d){
    	for(i=b ; i<d ; i++){
           for(j=0 ; j<a ; j++){
           	    s[i][j] = '.' ;
           }
    	}
    }else {
    	 for(i=d ; i<b ; i++){
    	 	 for(j=a ; j<a+c ; j++){
    	 	 	 s[i][j] = '.' ;
    	 	 }
    	 }
    }

    int x , k=0;
    char alpha ;
    bool inc=1 ;
    i=0 ;
    if(b>d){
       if((b-d)%2){
       	j=a+c-1 ;
        inc=0 ;
       }else j=0 ;
    }else {
       if((d-b)%2==0){
       	j=a+c-1 ;
       	inc=0 ;
       }
       else j=0 ;
    }
    while(n--){
    	 cin >> x ;
    	 alpha = 'a' + k++ ;

         while(x--){
         	if(inc){
         		if(s[i][j]=='.'){
         			i++ ; j-- ; inc=0 ; x++ ;
         			continue ;
         		}
         		s[i][j] = alpha ;
         		j++ ;
         		if(j==a+c){
         			i++ ; j-- ;
         			inc=0 ;
         		}
         	}else{
         		 if(s[i][j]=='.'){
         		 	 i++ ;  j++ ;  x++ ;  inc=1 ;
         		 	 continue ;
         		 }
         		 s[i][j] = alpha ;
         		 j-- ;
         		 if(j<0){
         		 	 i++ ; j=0 ;
         		 	 inc=1 ;
         		 }
         	}
         }
    }

    cout << "YES" << endl ;
    for(i=0 ; i<max(b,d) ; i++){
       for(j=0 ; j<a+c ; j++){
       	  cout << s[i][j] ;
       }
       cout << endl ;
    }

     return 0 ;
 }


#include<bits/stdc++.h>
using namespace std;

typedef long long             ll;
typedef unsigned long long    ull;
typedef vector<int>           vi;
typedef vector<ll>            vll;
typedef vector<vi>            vvi;
typedef pair<int, int>        pii;
typedef pair<ll, ll>          pll;
typedef complex<double>       point;

#define scf                   scanf
#define prf                   printf
#define f_io                  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file_r                freopen("input.txt", "r", stdin)
#define file_w                freopen("output.txt", "w", stdout)

#define all(c)                c.begin(), c.end()
#define sz(c)                 ((int)((c).size()))
#define pb                    push_back
#define eb                    emplace_back
#define popb                  pop_back

#define mkp                   make_pair
#define mkt                   make_tuple
#define xf                    first
#define ys                    second

#define getbit(i, mask)       ((mask & (((__typeof(mask))1)<<(i))) != 0)
#define setbit(i, mask)       (mask |= ((__typeof(mask))1)<<(i))
#define clrbit(i, mask)       (mask &= ~(((__typeof(mask))1)<<(i)))
#define togglebit(i, mask)    (mask ^= ((__typeof(mask))1)<<(i))

#define lp(i, s, e)           for(auto i = s; i < e; ++i)
#define rlp(i, e, s)          for(auto i = e; i > s; --i)
#define lp_(var , c)          for(const auto &var : c)

#define mems(c,val)           memset(c, val, sizeof(c))

#define mod                   998244353
#define OOi                   (~(1<<31))
#define OOl                   (~(1LL<<63))

#define PI                    (3.14159265358979)
#define EPS                   (1e-9)

#define watch(x)              cerr << ">> " << (#x) << " = " << (x) << endl

inline int dcmp(double a, double b){
	return fabs(a - b) < EPS ? 0 : a < b ? -1 : +1;
}
//____________________________________________________________________________.
const int N = 100 + 9;
char c[N][N];
vi v;
int n, m;

bool valid(int i, int j){
	return j > -1 && j < m && c[i][j] != '.';
}

int main(){
	int n1, m1, n2, m2;
	scf("%d %d %d %d", &m1, &n1, &m2, &n2);

	n = max(n1, n2);
	m = m1 + m2;

	int k;
	scf("%d", &k);

	v.resize(k);
	rlp(i,k-1,-1) scf("%d", &v[i]);

	if(n1 < n2) lp(i,n1,n) lp(j,0,m1) c[i][j] = '.';
	else lp(i,n2,n) lp(j,m1,m) c[i][j] = '.';

	int j, step;

	if(n2 < n1){
		if((n1 - n2) & 1) step = -1, j = m1 - 1;
		else step = 1, j = 0;
	}
	else{
		if((n2 - n1) & 1) step = +1, j = m1;
		else step = -1, j = m-1;
	}

	int p = 0;
	rlp(i, n-1, -1){
		while(valid(i, j)){
			c[i][j] = 'a' + p;
			if(--v.back() == 0)
				v.pop_back(), p++;
			j += step;
		}

		j -= step;
		step = step == +1 ? -1 : +1;
	}

	puts("YES");

	lp(i,0,n) puts(c[i]);

	return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long             ll;
typedef unsigned long long    ull;
typedef vector<int>           vi;
typedef vector<ll>            vll;
typedef vector<vi>            vvi;
typedef pair<int, int>        pii;
typedef pair<ll, ll>          pll;
typedef complex<double>       point;

#define scf                   scanf
#define prf                   printf
#define f_io                  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file_r                freopen("input.txt", "r", stdin)
#define file_w                freopen("output.txt", "w", stdout)

#define all(c)                c.begin(), c.end()
#define sz(c)                 ((int)((c).size()))
#define pb                    push_back
#define eb                    emplace_back
#define popb                  pop_back

#define mkp                   make_pair
#define mkt                   make_tuple
#define xf                    first
#define ys                    second

#define getbit(i, mask)       ((mask & (((__typeof(mask))1)<<(i))) != 0)
#define setbit(i, mask)       (mask |= ((__typeof(mask))1)<<(i))
#define clrbit(i, mask)       (mask &= ~(((__typeof(mask))1)<<(i)))
#define togglebit(i, mask)    (mask ^= ((__typeof(mask))1)<<(i))

#define lp(i, s, e)           for(auto i = s; i < e; ++i)
#define rlp(i, e, s)          for(auto i = e; i > s; --i)
#define lp_(var , c)          for(const auto &var : c)

#define mems(c,val)           memset(c, val, sizeof(c))

#define mod                   998244353
#define OOi                   (~(1<<31))
#define OOl                   (~(1LL<<63))

#define PI                    (3.14159265358979)
#define EPS                   (1e-9)

#define watch(x)              cerr << ">> " << (#x) << " = " << (x) << endl

inline int dcmp(double a, double b){
	return fabs(a - b) < EPS ? 0 : a < b ? -1 : +1;
}
//____________________________________________________________________________.
const int N = 100 + 9;
char c[N][N];
vi v;
int n, m;

bool valid(int i, int j){
	return j > -1 && j < m && c[i][j] != '.';
}

int main(){
	int n1, m1, n2, m2;
	scf("%d %d %d %d", &m1, &n1, &m2, &n2);

	n = max(n1, n2);
	m = m1 + m2;

	int k;
	scf("%d", &k);

	v.resize(k);
	rlp(i,k-1,-1) scf("%d", &v[i]);

	if(n1 < n2) lp(i,n1,n) lp(j,0,m1) c[i][j] = '.';
	else lp(i,n2,n) lp(j,m1,m) c[i][j] = '.';

	int j, step;

	if(n2 < n1){
		if((n1 - n2) & 1) step = -1, j = m2 - 1;
		else step = 1, j = 0;
	}
	else{
		if((n2 - n1) & 1) step = +1, j = m2;
		else step = -1, j = m-1;
	}

	int p = 0;
	rlp(i, n-1, -1){
		while(valid(i, j)){
			c[i][j] = 'a' + p;
			if(--v.back() == 0)
				v.pop_back(), p++;
			j += step;
		}

		j -= step;
		step = step == +1 ? -1 : +1;
	}

	puts("YES");

	lp(i,0,n) puts(c[i]);

	return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long             ll;
typedef unsigned long long    ull;
typedef vector<int>           vi;
typedef vector<ll>            vll;
typedef vector<vi>            vvi;
typedef pair<int, int>        pii;
typedef pair<ll, ll>          pll;
typedef complex<double>       point;

#define scf                   scanf
#define prf                   printf
#define f_io                  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define file_r                freopen("input.txt", "r", stdin)
#define file_w                freopen("output.txt", "w", stdout)

#define all(c)                c.begin(), c.end()
#define sz(c)                 ((int)((c).size()))
#define pb                    push_back
#define eb                    emplace_back
#define popb                  pop_back

#define mkp                   make_pair
#define mkt                   make_tuple
#define xf                    first
#define ys                    second

#define getbit(i, mask)       ((mask & (((__typeof(mask))1)<<(i))) != 0)
#define setbit(i, mask)       (mask |= ((__typeof(mask))1)<<(i))
#define clrbit(i, mask)       (mask &= ~(((__typeof(mask))1)<<(i)))
#define togglebit(i, mask)    (mask ^= ((__typeof(mask))1)<<(i))

#define isodd(x)              ((x) & 1)
#define iseven(x)             (!((x) & 1))

#define lp(i, s, e)           for(auto i = s; i < e; ++i)
#define rlp(i, e, s)          for(auto i = e; i > s; --i)
#define lp_(var , c)          for(const auto &var : c)

#define mems(c,val)           memset(c, val, sizeof(c))

#define mod                   998244353
#define OOi                   (~(1<<31))
#define OOl                   (~(1LL<<63))

#define PI                    (3.14159265358979)
#define EPS                   (1e-9)

#define watch(x)              cerr << ">> " << (#x) << " = " << (x) << endl

inline int dcmp(double a, double b){
	return fabs(a - b) < EPS ? 0 : a < b ? -1 : +1;
}
//____________________________________________________________________________.
const int N = 100 + 9;
char c[N][N];
int s[N];
int n, m;

inline bool valid(int i, int j){
	return j > -1 && j < m && c[i][j] != '.';
}

int main(){
	int n1, n2, m1, m2, k;
	scf("%d %d %d %d %d", &m1, &n1, &m2, &n2, &k);

	lp(i,0,k) scf("%d", s+i);

	n = max(n1, n2);
	m = m1 + m2;

	int j, step;

	if(n1 < n2){
		lp(i,n1,n) lp(j,0,m1) c[i][j] = '.';

		if(isodd(n2-n1)) j = m1, step = +1;
		else j = m-1, step = -1;
	}

	else{
		lp(i,n2,n) lp(j,m1,m) c[i][j] = '.';

		if(isodd(n1-n2)) j = m1-1, step = -1;
		else j = 0, step = +1;
	}

	int curp = 0;

	rlp(i,n-1,-1){
		while(valid(i, j)){
			c[i][j] = 'a' + curp;
			if(--s[curp] == 0) curp++;

			j+=step;
		}

		j -= step;
		step *= -1;
	}

	puts("YES");
	lp(i,0,n) puts(c[i]);

	return 0;
}


// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize ("-ffloat-store")
#include "bits/stdc++.h"
using namespace std;
// #define ll long long int
#define ll int
#define double /*long*/ double
// #define endl '\n'
#define vll vector<ll>
#define vvl vector<vll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define vppll vector<pair<pll,pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll,ll>
#define fir first
#define sec second
#define _cin ios_base::sync_with_stdio(0);  cin.tie(0);
#define fo(i,b) for(i=0;i<b;++i)
#define repa(i,a,b) for(i=a;i<b;++i)
#define repb(i,a,b) for(i=a;i>=b;--i)
#define all(x) (x).begin(), (x).end()
#define s(v) (ll)v.size()
#define watch(x) cerr << (#x) << " is " << (x) << endl
#define watch2(x,y) cerr << (#x) << " is " << (x) << " and " << (#y) << " is " << (y) << endl
#define Time cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n"
#define inf 2000000000000000000
#define mod  1000000007
#define mod1 998244353
const int SZ = 1000005;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> // order_of_key() ; *( find_by_order() ) -> kth element in set;
using namespace __gnu_pbds;  // order_of_key(k) -> Number of elements strictly smaller than k
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>

// inline ll max(ll a,ll b,ll c) {return max(max(a, b), c);}
// inline ll min( ll a, ll b, ll c) { return min(min(a, b), c);}
// inline ll max(ll a,ll b) {return (a>b) ? a : b;}
// inline ll min(ll a,ll b) {return (a<b) ? a : b;}
// inline ll mul(ll x, ll y, ll mod_){return ((x%mod_)*1LL*(y%mod_))%mod_;}
// ll power(ll a, ll n) {ll p = 1;while (n > 0) {if(n%2) {p = p * a;} n >>= 1; a *= a;} return p;}
// ll powm(ll a, ll n, ll mod_){ ll p=1; while(n){ if(n%2){ p=mul(p,a,mod_);} n>>=1; a=mul(a,a,mod_);} return p%mod_;}
// ll powi(ll a, ll mod_) {return powm(a,mod_-2,mod_);}
                          /*Code Begins*/

int main(){
    #ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
    _cin;
    // cout << setprecision(15);
    ll mn, mx;
    ll n, m, t, k, i, j, sum=0, flag=0, cnt=0;
    ll x=0, y=0, z, l , r, q;
    int TC=1;
    // cin >> TC;
while(TC--){
    ll a, b, c, d, n;
    cin >> a >> b >> c >> d >> n;
    vpll v(n);
    fo(i,n) cin >> v[i].fir, v[i].sec=i;
    sort(all(v));
    sum=0;i=0;
    while(sum+v[i].fir<=a*b) sum+=v[i++].fir;
    ll left = a*b-sum;
    std::vector<std::vector<char>> ans(max(b,d),std::vector<char>(a+c,'.'));
    l=0;r=a-1;
    ll I=i;
    int fl=1;
    while(left--){
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==b){
                l=b-1;
                --r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                --r;
                fl=1;
            }
        }
    }
    --i;
    while(i>=0){
        if(v[i].fir==0){
            --i;
            continue;
        }
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==b){
                l=b-1;
                --r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                --r;
                fl=1;
            }
        }

    }
    i=I;
    l=0;
    r=a;
    fl=1;
    while(i<n){
        if(v[i].fir==0){
            ++i;
            continue;
        }
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==d){
                l=d-1;
                ++r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                ++r;
                fl=1;
            }
        }
    }
    fo(i,max(b,d)){
        fo(j,a+c) cout << ans[i][j];
        cout << endl;
    }

}
    Time;
    return 0;
}


// #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize ("-ffloat-store")
#include "bits/stdc++.h"
using namespace std;
// #define ll long long int
#define ll int
#define double /*long*/ double
// #define endl '\n'
#define vll vector<ll>
#define vvl vector<vll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define vppll vector<pair<pll,pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll,ll>
#define fir first
#define sec second
#define _cin ios_base::sync_with_stdio(0);  cin.tie(0);
#define fo(i,b) for(i=0;i<b;++i)
#define repa(i,a,b) for(i=a;i<b;++i)
#define repb(i,a,b) for(i=a;i>=b;--i)
#define all(x) (x).begin(), (x).end()
#define s(v) (ll)v.size()
#define watch(x) cerr << (#x) << " is " << (x) << endl
#define watch2(x,y) cerr << (#x) << " is " << (x) << " and " << (#y) << " is " << (y) << endl
#define Time cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n"
#define inf 2000000000000000000
#define mod  1000000007
#define mod1 998244353
const int SZ = 1000005;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> // order_of_key() ; *( find_by_order() ) -> kth element in set;
using namespace __gnu_pbds;  // order_of_key(k) -> Number of elements strictly smaller than k
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>

// inline ll max(ll a,ll b,ll c) {return max(max(a, b), c);}
// inline ll min( ll a, ll b, ll c) { return min(min(a, b), c);}
// inline ll max(ll a,ll b) {return (a>b) ? a : b;}
// inline ll min(ll a,ll b) {return (a<b) ? a : b;}
// inline ll mul(ll x, ll y, ll mod_){return ((x%mod_)*1LL*(y%mod_))%mod_;}
// ll power(ll a, ll n) {ll p = 1;while (n > 0) {if(n%2) {p = p * a;} n >>= 1; a *= a;} return p;}
// ll powm(ll a, ll n, ll mod_){ ll p=1; while(n){ if(n%2){ p=mul(p,a,mod_);} n>>=1; a=mul(a,a,mod_);} return p%mod_;}
// ll powi(ll a, ll mod_) {return powm(a,mod_-2,mod_);}
                          /*Code Begins*/

int main(){
    #ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    freopen("error.txt", "w", stderr);
    #endif
    _cin;
    // cout << setprecision(15);
    ll mn, mx;
    ll n, m, t, k, i, j, sum=0, flag=0, cnt=0;
    ll x=0, y=0, z, l , r, q;
    int TC=1;
    // cin >> TC;
while(TC--){
    ll a, b, c, d, n;
    cin >> a >> b >> c >> d >> n;
    vpll v(n);
    fo(i,n) cin >> v[i].fir, v[i].sec=i;
    sort(all(v));
    sum=0;i=0;
    while(sum+v[i].fir<=a*b) sum+=v[i++].fir;
    ll left = a*b-sum;
    std::vector<std::vector<char>> ans(max(b,d),std::vector<char>(a+c,'.'));
    l=0;r=a-1;
    ll I=i;
    int fl=1;
    while(left--){
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==b){
                l=b-1;
                --r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                --r;
                fl=1;
            }
        }
    }
    --i;
    while(i>=0){
        if(v[i].fir==0){
            --i;
            continue;
        }
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==b){
                l=b-1;
                --r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                --r;
                fl=1;
            }
        }

    }
    i=I;
    l=0;
    r=a;
    fl=1;
    while(i<n){
        if(v[i].fir==0){
            ++i;
            continue;
        }
        ans[l][r]=(char)(v[i].sec+'a');
        v[i].fir--;
        if(fl){
            ++l;
            if(l==d){
                l=d-1;
                ++r;
                fl=0;
            }
        }else{
            --l;
            if(l==-1){
                l=0;
                ++r;
                fl=1;
            }
        }
    }
    cout << "YES\n";
    fo(i,max(b,d)){
        fo(j,a+c) cout << ans[i][j];
        cout << endl;
    }

}
    Time;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
bool belongs(int r, int c, int row, int col) {
	if(c<0) return false;
	if(c<col and r<row) return true;
	return false;
}
void test(vector<vector<char>> arr, int row, int col) {
	for(int i=0;i<row;i++){
    	for(int j=0;j<col;j++)
    		cout<<arr[i][j];
    	cout<<endl;
    }
}
signed main() {
	int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    int row = max(b,d), col = a + c;
    vector<vector<char>> arr( row, vector<char>( col, '#' ) );
    for(int i=0;i<row;i++){
    	for(int j=0;j<col;j++){
    		if(belongs(i,j,b,a) or belongs(i,j-a,d,c)) continue;
    		arr[i][j] = '.';
    	}
    }
    int temp_r = 1, temp_c = 1;
    bool is_dec = false;
    if(a%2) temp_r = b, is_dec = true;
    char curr = 'a';
    cout<<"YES\n";
    for(int i=0;i<n;i++) {
    	int sq;cin>>sq;
    	while(sq--) {
    		while(arr[temp_r-1][temp_c-1] != '#') {
	    		if(is_dec) {
	    			temp_r--;
	    			if(temp_r<0){
	    				temp_r = 0;
	    				temp_c++;
	    				is_dec = false;
	    			}
	    		}
	    		else {
	    			temp_r++;
	    			if(temp_r>row) {
	    				temp_r = row;
	    				temp_c++;
	    				is_dec = true;
	    			}
	    		}
    		}
    		arr[temp_r-1][temp_c-1] = curr;
    	}
    	curr++;
    }
    test(arr,row,col);
}


#include<bits/stdc++.h>
using namespace std;
bool belongs(int r, int c, int row, int col) {
	if(c<0) return false;
	if(c<col and r<row) return true;
	return false;
}
void test(vector<vector<char>> arr, int row, int col) {
	for(int i=0;i<row;i++){
    	for(int j=0;j<col;j++)
    		cout<<arr[i][j];
    	cout<<endl;
    }
}
signed main() {
	int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    int row = max(b,d), col = a + c;
    vector<vector<char>> arr( row, vector<char>( col, '#' ) );
    for(int i=0;i<row;i++){
    	for(int j=0;j<col;j++){
    		if(belongs(i,j,b,a) or belongs(i,j-a,d,c)) continue;
    		arr[i][j] = '.';
    	}
    }
    int temp_r = 1, temp_c = 1;
    bool is_dec = false;
    if(a%2) temp_r = b, is_dec = true;
    char curr = 'a';
    cout<<"YES\n";
    for(int i=0;i<n;i++) {
    	int sq;cin>>sq;
    	while(sq--) {
    		while(arr[temp_r-1][temp_c-1] != '#') {
	    		if(is_dec) {
	    			temp_r--;
	    			if(temp_r<=0){
	    				temp_r = 1;
	    				temp_c++;
	    				is_dec = false;
	    			}
	    		}
	    		else {
	    			temp_r++;
	    			if(temp_r>row) {
	    				temp_r = row;
	    				temp_c++;
	    				is_dec = true;
	    			}
	    		}
    		}
    		arr[temp_r-1][temp_c-1] = curr;
    	}
    	curr++;
    }
    test(arr,row,col);
}


#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
typedef bitset<15>mask;
#define F first
#define FF first.first
#define FS first.second
#define S second
#define SF second.first
#define SS second.second
#define all(V) V.begin(),V.end()
#define pp pair<ll,ll>
ll PI = acos(-1.0),MOD=1000000007;
ll n,m,x,y,z,k,sol,sum,ans,l,r,xx,yy;
ll a[100],b[1000000],mem[100][200];
vector<ll>v;
vector<ll>v1;
vector<ll>v2;
vector<pp>vp;
map<ll,ll>ma;
string s1,s2,s;
set<ll>st;
char c;
int main()
{
//freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin>>x>>y>>xx>>yy>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    ll coul=0,row=0;
      bool bol = 0;
    for(int i=1;i<=n;i++){
        sum = a[i];
        while(sum--){
            if(coul == x+xx){
                coul = x+xx-1;
                row++;
                bol=!bol;
            }
            if(coul == -1){
                coul++;
                row++;
                bol=!bol;
            }
            mem[row][coul]=i;
            if(!bol)
            coul++;
            else coul--;
        }
    }
    cout<<"YES"<<endl;
    for(int i=0;i<max(y,yy);i++){
        for(int q=0;q<x+xx;q++){
            if(!mem[i][q])cout<<'.';
            else {
                c = 'a'+mem[i][q]-1;
                cout<<c;
            }
        }
        cout<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
typedef bitset<15>mask;
#define F first
#define FF first.first
#define FS first.second
#define S second
#define SF second.first
#define SS second.second
#define all(V) V.begin(),V.end()
#define pp pair<ll,ll>
ll PI = acos(-1.0),MOD=1000000007;
ll n,m,x,y,z,k,sol,sum,ans,l,r,xx,yy;
ll a[100],b[1000000],mem[100][200];
vector<ll>v;
vector<ll>v1;
vector<ll>v2;
vector<pp>vp;
map<ll,ll>ma;
string s1,s2,s;
set<ll>st;
char c;
int main()
{
//freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin>>x>>y>>xx>>yy>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    ll coul=0,row=0;
      bool bol = 0;
    for(int i=1;i<=n;i++){
        sum = a[i];
        while(sum--){
            if(coul == x+xx){
                coul = x+xx-1;
                row++;
                bol=!bol;
            }
            if(coul == -1){
                coul++;
                row++;
                bol=!bol;
            }
            mem[row][coul]=i;
            if(!bol)
            coul++;
            else coul--;
        }
    }
    for(int i=0;i<max(y,yy);i++){
        for(int q=0;q<x+xx;q++){
            if(!mem[i][q])cout<<'.';
            else {
                c = 'a'+mem[i][q]-1;
                cout<<c;
            }
        }
        cout<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
typedef bitset<15>mask;
#define F first
#define FF first.first
#define FS first.second
#define S second
#define SF second.first
#define SS second.second
#define all(V) V.begin(),V.end()
#define pp pair<ll,ll>
ll PI = acos(-1.0),MOD=1000000007;
ll n,m,x,y,z,k,sol,sum,ans,l,r,xx,yy;
ll a[1000000],b[1000000],mem[6000][6000];
vector<ll>v;
vector<ll>v1;
vector<ll>v2;
vector<pp>vp;
map<ll,ll>ma;
string s1,s2,s;
set<ll>st;
char c;
int main()
{
//freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin>>x>>y>>xx>>yy>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    ll coul=0,row=0;
      bool bol = 0;
    for(int i=1;i<=n;i++){
        sum = a[i];
        while(sum--){
            if(coul == x+xx){
                coul = x+xx-1;
                row++;
                bol=!bol;
            }
            if(coul == -1){
                coul++;
                row++;
                bol=!bol;
            }
            mem[row][coul]=i;
            if(!bol)
            coul++;
            else coul--;
        }
    }
    for(int i=0;i<max(y,yy);i++){
        for(int q=0;q<x+xx;q++){
            if(!mem[i][q])cout<<'.';
            else {
                c = 'a'+mem[i][q]-1;
                cout<<c;
            }
        }
        cout<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
typedef bitset<15>mask;
#define F first
#define FF first.first
#define FS first.second
#define S second
#define SF second.first
#define SS second.second
#define all(V) V.begin(),V.end()
#define pp pair<ll,ll>
ll PI = acos(-1.0),MOD=1000000007;
ll n,m,x,y,z,k,sol,sum,ans,l,r,xx,yy;
ll a[100],b[1000000],mem[100][200];
vector<ll>v;
vector<ll>v1;
vector<ll>v2;
vector<pp>vp;
map<ll,ll>ma;
string s1,s2,s;
set<ll>st;
char c;
int main()
{
//freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin>>x>>y>>xx>>yy>>n;
    for(int i=1; i<=n; i++)
        cin>>a[i];
    bool bol = 0,down=0;
    for(int i=0; i<y; i++)
    {
        for(int q=0; q<x; q++)
        {
            mem[i][q]=100;
        }
    }
    for(int i=0; i<yy; i++)
    {
        for(int q=x; q<xx+x; q++)
        {
            mem[i][q]=100;
        }
    }
    ll idx=1;
    if(x%2==0)
        down=0;
    else
        down=1;
    for(int i=0; i<x+xx; i++)
    {
        if(!down)
        {
            down=!down;
            for(int q=0; q<max(y,yy); q++)
            {
                if(a[idx]>0)
                {
                    if(mem[q][i]==100)
                    {
                        a[idx]--;
                        mem[q][i]=idx;
                    }
                }
                else
                    idx++,q--;
            }
        }
        else
        {
            down=!down;
            for(int q=max(y,yy)-1; q>=0; q--)
            {
                if(a[idx]>0)
                {
                    if(mem[q][i]==100)
                    {
                        a[idx]--;
                        mem[q][i]=idx;
                    }
                }
                else
                    idx++,q++;
            }
        }
    }

    cout<<endl;
    cout<<"YES"<<endl;
    for(int i=0; i<max(y,yy); i++)
    {
        for(int q=0; q<x+xx; q++)
        {
            if(!mem[i][q])
                cout<<'.';
            else
            {
                c = 'a'+mem[i][q]-1;
                cout<<c;
            }
        }
        cout<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int n,a,b,c,d,x[28],sol[51][51],counter=1;
int character()
{
    if (x[counter]>0)
        x[counter]--;
    else
        x[++counter]--;

    return counter;
}
void write_forward(int line,int left,int right)
{
    int j;
    for (j=left;j<=right;j++)sol[line][j]=character();
}
void write_backward(int line,int left,int right)
{
    int j;
    for (j=right;j>=left;j--)sol[line][j]=character();
}
int main()
{int i,j,p;
    cin>>a>>b>>c>>d>>n;
    for (i=1;i<=n;i++)cin>>x[i];
    cout<<"YES\n";
    if (b%2==1)
    {
        p=1;
        for (i=b;i>=1;i--)
            if (p==1)
                write_forward(i,1,a),
                p=0;
            else
                write_backward(i,1,a),
                p=1;

        p=1;
        for (i=1;i<=d;i++)
            if (p==1)
                write_forward(i,a+1,a+c),
                p=0;
            else
                write_backward(i,a+1,a+c),
                p=1;
    }
    else
    {
        p=1;
        for (i=b;i>=1;i--)
            if (p==1)
                write_backward(i,1,a),
                p=0;
            else
                write_forward(i,1,a),
                p=1;

        p=1;
        for (i=1;i<=d;i++)
            if (p==1)
                write_forward(i,a+1,a+c),
                p=0;
            else
                write_backward(i,a+1,a+c),
                p=1;
    }
            for (i=1;i<=max(b,d);i++){
            for (j=1;j<=a+c;j++)
                if (sol[i][j]==0)cout<<'.';
            else
                cout<<char(sol[i][j]+'a'-1);
                cout<<"\n";}
}


#include <bits/stdc++.h>
using namespace std;
int n,a,b,c,d,x[28],sol[105][105],counter=1;
int character()
{
    if (x[counter]>0)
        x[counter]--;
    else
        x[++counter]--;

    return counter;
}
void write_forward(int line,int left,int right)
{
    int j;
    for (j=left;j<=right;j++)sol[line][j]=character();
}
void write_backward(int line,int left,int right)
{
    int j;
    for (j=right;j>=left;j--)sol[line][j]=character();
}
int main()
{int i,j,p;
    cin>>a>>b>>c>>d>>n;
    for (i=1;i<=n;i++)cin>>x[i];
    cout<<"YES\n";
    if (b%2==1)
    {
        p=1;
        for (i=b;i>=1;i--)
            if (p==1)
                write_forward(i,1,a),
                p=0;
            else
                write_backward(i,1,a),
                p=1;

        p=1;
        for (i=1;i<=d;i++)
            if (p==1)
                write_forward(i,a+1,a+c),
                p=0;
            else
                write_backward(i,a+1,a+c),
                p=1;
    }
    else
    {
        p=1;
        for (i=b;i>=1;i--)
            if (p==1)
                write_backward(i,1,a),
                p=0;
            else
                write_forward(i,1,a),
                p=1;

        p=1;
        for (i=1;i<=d;i++)
            if (p==1)
                write_forward(i,a+1,a+c),
                p=0;
            else
                write_backward(i,a+1,a+c),
                p=1;
    }
            for (i=1;i<=max(b,d);i++){
            for (j=1;j<=a+c;j++)
                if (sol[i][j]==0)cout<<'.';
            else
                cout<<char(sol[i][j]+'a'-1);
                cout<<"\n";}
}


#include <bits/stdc++.h>
using namespace std;
 #define MOD 1000000007
 #define A '@'
 #define B '*'
 #define C '#'
 #define max(a,b) ((a>b)?a:b)
 #define min(a,b) ((a<b)?a:b)
 #define endl "\n"
 struct frac {long x; long y;};
 frac operator+(frac a, frac b)
 {
 	frac res;
 	res.x=((a.x)*(b.y))%MOD+((b.x)*(a.y))%MOD;
 	res.x%=MOD;
 	res.y=a.y*b.y;
 	res.y%=MOD;
 	return res;
 }

 long long bow (long long a, long long x)
 {
 	if (!x) return 1;
	long long res=bow(a,x/2);
	res*=res; res%=MOD;
	if (x%2) res*=a;
	return (res)%MOD;
 }

 long long get_mod(long long x, long long y)
 {
 	long long d=__gcd(x,y);
 	x/=d;
 	y/=d;
 	x%=MOD;
 	y%=MOD;
 	return (x*(bow(y,MOD-2)))%MOD;
 }

typedef vector<int> vi;

// Union-Find Disjoint Sets Library
// PS: This library code does not include the `union by rank' heuristic yet
// 1000 is just a rough number, adjustable by user
vi pset(3000), setSize(3000);

int _numDisjointSets;

void initSet(int N) {
     setSize.assign(N, 1);
     _numDisjointSets = N;
     pset.assign(N, 0);
     for (int i = 0; i < N; i++) pset[i] = i;
}

int findSet(int i) {
    return (pset[i] == i) ? i : (pset[i] = findSet(pset[i]));
}

bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }

void unionSet(int i, int j) {
  if (!isSameSet(i, j)) {
    _numDisjointSets--;
    setSize[findSet(j)] += setSize[findSet(i)];
    pset[findSet(i)] = findSet(j); }
}

int numDisjointSets() { return _numDisjointSets; }

int sizeOfSet(int i) { return setSize[findSet(i)]; }

long long t,k,n,m, i,j,jj,mid,a,b,c,d,root;
vector <frac> snake1,snake2,snake;
long long dp[100001],pre[100001];
vector <long long> child[2501];
vector<long long> ord[2501];
char res[101][101],cc;
int main()
{
   ios::sync_with_stdio(0);
   cin.tie(0);
   cout.tie(0);
   cin>>a>>b>>c>>d>>n;
   for (i=1;i<=100;i++) for (j=1;j<=100;j++) res[i][j]='.';
   for (j=1;j<=a;j++)
   {
   	if (j%2) for (i=1;i<=b;i++)
   	snake1.push_back({i,a+1-j});
   	else for (i=b;i>=1;i--)
   	snake1.push_back({i,a+1-j});

   }
   for (j=1;j<=c;j++)
   {
   	if (j%2) for (i=1;i<=d;i++)
   	snake2.push_back({i,j+a});
   	else for (i=d;i>=1;i--)
   	snake2.push_back({i,j+a});

   }
   for (i=c*d-1;i>=0;i--) snake.push_back(snake2[i]);
   for (i=0;i<a*b;i++) snake.push_back(snake1[i]);
   j=-1;
   for (i=0;i<n;i++)
   {
   	cin>>t;
   	cc=97+i;
   	for (k=0;k<t;k++)
   	{
   		j++;
	   	res[snake[j].x][snake[j].y]=cc;
   	}
   }
   for (i=1;i<=max(b,d);i++)
   {

   for (j=1;j<=a+c;j++) cout<<res[i][j]; cout<<endl;
   }
}
/*
1880/1900
*/


#include <bits/stdc++.h>
using namespace std;
 #define MOD 1000000007
 #define A '@'
 #define B '*'
 #define C '#'
 #define max(a,b) ((a>b)?a:b)
 #define min(a,b) ((a<b)?a:b)
 #define endl "\n"
 struct frac {long x; long y;};
 frac operator+(frac a, frac b)
 {
 	frac res;
 	res.x=((a.x)*(b.y))%MOD+((b.x)*(a.y))%MOD;
 	res.x%=MOD;
 	res.y=a.y*b.y;
 	res.y%=MOD;
 	return res;
 }

 long long bow (long long a, long long x)
 {
 	if (!x) return 1;
	long long res=bow(a,x/2);
	res*=res; res%=MOD;
	if (x%2) res*=a;
	return (res)%MOD;
 }

 long long get_mod(long long x, long long y)
 {
 	long long d=__gcd(x,y);
 	x/=d;
 	y/=d;
 	x%=MOD;
 	y%=MOD;
 	return (x*(bow(y,MOD-2)))%MOD;
 }

typedef vector<int> vi;

// Union-Find Disjoint Sets Library
// PS: This library code does not include the `union by rank' heuristic yet
// 1000 is just a rough number, adjustable by user
vi pset(3000), setSize(3000);

int _numDisjointSets;

void initSet(int N) {
     setSize.assign(N, 1);
     _numDisjointSets = N;
     pset.assign(N, 0);
     for (int i = 0; i < N; i++) pset[i] = i;
}

int findSet(int i) {
    return (pset[i] == i) ? i : (pset[i] = findSet(pset[i]));
}

bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }

void unionSet(int i, int j) {
  if (!isSameSet(i, j)) {
    _numDisjointSets--;
    setSize[findSet(j)] += setSize[findSet(i)];
    pset[findSet(i)] = findSet(j); }
}

int numDisjointSets() { return _numDisjointSets; }

int sizeOfSet(int i) { return setSize[findSet(i)]; }

long long t,k,n,m, i,j,jj,mid,a,b,c,d,root;
vector <frac> snake1,snake2,snake;
long long dp[100001],pre[100001];
vector <long long> child[2501];
vector<long long> ord[2501];
char res[101][101],cc;
int main()
{
   ios::sync_with_stdio(0);
   cin.tie(0);
   cout.tie(0);
   cin>>a>>b>>c>>d>>n;
   for (i=1;i<=100;i++) for (j=1;j<=100;j++) res[i][j]='.';
   for (j=1;j<=a;j++)
   {
   	if (j%2) for (i=1;i<=b;i++)
   	snake1.push_back({i,a+1-j});
   	else for (i=b;i>=1;i--)
   	snake1.push_back({i,a+1-j});

   }
   for (j=1;j<=c;j++)
   {
   	if (j%2) for (i=1;i<=d;i++)
   	snake2.push_back({i,j+a});
   	else for (i=d;i>=1;i--)
   	snake2.push_back({i,j+a});

   }
   for (i=c*d-1;i>=0;i--) snake.push_back(snake2[i]);
   for (i=0;i<a*b;i++) snake.push_back(snake1[i]);
   j=-1;
   for (i=0;i<n;i++)
   {
   	cin>>t;
   	cc=97+i;
   	for (k=0;k<t;k++)
   	{
   		j++;
	   	res[snake[j].x][snake[j].y]=cc;
   	}
   }
   cout<<YES<<endl;
   for (i=1;i<=max(b,d);i++)
   {

   for (j=1;j<=a+c;j++) cout<<res[i][j]; cout<<endl;
   }
}
/*
1880/1900
*/


#include <bits/stdc++.h>
using namespace std;
 #define MOD 1000000007
 #define A '@'
 #define B '*'
 #define C '#'
 #define max(a,b) ((a>b)?a:b)
 #define min(a,b) ((a<b)?a:b)
 #define endl "\n"
 struct frac {long x; long y;};
 frac operator+(frac a, frac b)
 {
 	frac res;
 	res.x=((a.x)*(b.y))%MOD+((b.x)*(a.y))%MOD;
 	res.x%=MOD;
 	res.y=a.y*b.y;
 	res.y%=MOD;
 	return res;
 }

 long long bow (long long a, long long x)
 {
 	if (!x) return 1;
	long long res=bow(a,x/2);
	res*=res; res%=MOD;
	if (x%2) res*=a;
	return (res)%MOD;
 }

 long long get_mod(long long x, long long y)
 {
 	long long d=__gcd(x,y);
 	x/=d;
 	y/=d;
 	x%=MOD;
 	y%=MOD;
 	return (x*(bow(y,MOD-2)))%MOD;
 }

typedef vector<int> vi;

// Union-Find Disjoint Sets Library
// PS: This library code does not include the `union by rank' heuristic yet
// 1000 is just a rough number, adjustable by user
vi pset(3000), setSize(3000);

int _numDisjointSets;

void initSet(int N) {
     setSize.assign(N, 1);
     _numDisjointSets = N;
     pset.assign(N, 0);
     for (int i = 0; i < N; i++) pset[i] = i;
}

int findSet(int i) {
    return (pset[i] == i) ? i : (pset[i] = findSet(pset[i]));
}

bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }

void unionSet(int i, int j) {
  if (!isSameSet(i, j)) {
    _numDisjointSets--;
    setSize[findSet(j)] += setSize[findSet(i)];
    pset[findSet(i)] = findSet(j); }
}

int numDisjointSets() { return _numDisjointSets; }

int sizeOfSet(int i) { return setSize[findSet(i)]; }

long long t,k,n,m, i,j,jj,mid,a,b,c,d,root;
vector <frac> snake1,snake2,snake;
long long dp[100001],pre[100001];
vector <long long> child[2501];
vector<long long> ord[2501];
char res[101][101],cc;
int main()
{
   ios::sync_with_stdio(0);
   cin.tie(0);
   cout.tie(0);
   cin>>a>>b>>c>>d>>n;
   for (i=1;i<=100;i++) for (j=1;j<=100;j++) res[i][j]='.';
   for (j=1;j<=a;j++)
   {
   	if (j%2) for (i=1;i<=b;i++)
   	snake1.push_back({i,a+1-j});
   	else for (i=b;i>=1;i--)
   	snake1.push_back({i,a+1-j});

   }
   for (j=1;j<=c;j++)
   {
   	if (j%2) for (i=1;i<=d;i++)
   	snake2.push_back({i,j+a});
   	else for (i=d;i>=1;i--)
   	snake2.push_back({i,j+a});

   }
   for (i=c*d-1;i>=0;i--) snake.push_back(snake2[i]);
   for (i=0;i<a*b;i++) snake.push_back(snake1[i]);
   j=-1;
   for (i=0;i<n;i++)
   {
   	cin>>t;
   	cc=97+i;
   	for (k=0;k<t;k++)
   	{
   		j++;
	   	res[snake[j].x][snake[j].y]=cc;
   	}
   }
   cout<<"YES"<<endl;
   for (i=1;i<=max(b,d);i++)
   {

   for (j=1;j<=a+c;j++) cout<<res[i][j]; cout<<endl;
   }
}
/*
1880/1900
*/


#include <bits/stdc++.h>

#define F first
#define S second
#define pb push_back
#define ll long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define eb emplace_back
#define cd complex<long double>
#define sz(x) int((x).size())
#define pii pair<ll, ll>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define vpii vector<pii>
#define sqr(x) ((x) * (x))
#define fenwick(x) ((x) & -(x))
#define debug(x) cout << "[ " << #x << " ]: " << x << endl;
#define FOR(a, b, c) for(int a = b; a < c; ++a)
#define we                        \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);

using namespace std;

const int maxa = 100;

int mapa[maxa][maxa];

int main()
{
    we

    int a, b, c, d, n;

    cin >> a >> b >> c >> d >> n;

    vector <int> tab(n);
    for(auto &p : tab)cin >> p;
    int licz = 0;
    int kt = 0;

    int pocz = b - 1;
    int kier = -1;
    if(a % 2 == 0)pocz = 0, kier = 1;

    for(int i = 0; i < a; ++i)
    {
        while(pocz != -1 && pocz != b)
        {
            mapa[pocz][i] = kt + 1;
            ++licz;
            if(licz == tab[kt])kt++, licz = 0;
            pocz += kier;
        }

        kier *= -1;
        if(pocz == -1)pocz = 0;
        else pocz = b - 1;
    }

    pocz = d - 1;
    kier = -1;
    if(c % 2 == 0)pocz = 0, kier = 1;

    for(int i = 0; i < c; ++i)
    {
        while(pocz != -1 && pocz != d)
        {
            mapa[pocz][i + a] = kt +1 ;
            ++licz;
            if(licz == tab[kt])kt++, licz = 0;
            pocz += kier;
        }

        kier *= -1;
        if(pocz == -1)pocz = 0;
        else pocz = d - 1;
    }

    cout << "YES\n";

    for(int i = 0; i < max(b, d); ++i)
    {
        for(int j = 0; j < a + c; ++j)
        {
            if(mapa[i][j])cout << char(mapa[i][j]  - 1 + 'a');
            else cout << ".";
        }
        cout << "\n";
    }

    return 0;
}


#include <bits/stdc++.h>

#define F first
#define S second
#define pb push_back
#define ll long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define eb emplace_back
#define cd complex<long double>
#define sz(x) int((x).size())
#define pii pair<ll, ll>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define vpii vector<pii>
#define sqr(x) ((x) * (x))
#define fenwick(x) ((x) & -(x))
#define debug(x) cout << "[ " << #x << " ]: " << x << endl;
#define FOR(a, b, c) for(int a = b; a < c; ++a)
#define we                        \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);

using namespace std;

const int maxa = 100;

int mapa[maxa][maxa];

int main()
{
    we

    int a, b, c, d, n;

    cin >> a >> b >> c >> d >> n;

    vector <int> tab(n);
    for(auto &p : tab)cin >> p;
    int licz = 0;
    int kt = 0;

    int pocz = b - 1;
    int kier = -1;
    if(a % 2 == 0)pocz = 0, kier = 1;

    for(int i = 0; i < a; ++i)
    {
        while(pocz != -1 && pocz != b)
        {
            mapa[pocz][i] = kt + 1;
            ++licz;
            if(licz == tab[kt])kt++, licz = 0;
            pocz += kier;
        }

        kier *= -1;
        if(pocz == -1)pocz = 0;
        else pocz = b - 1;
    }

    pocz = 0;
    kier = 1;

    for(int i = 0; i < c; ++i)
    {
        while(pocz != -1 && pocz != d)
        {
            mapa[pocz][i + a] = kt +1 ;
            ++licz;
            if(licz == tab[kt])kt++, licz = 0;
            pocz += kier;
        }

        kier *= -1;
        if(pocz == -1)pocz = 0;
        else pocz = d - 1;
    }

    cout << "YES\n";

    for(int i = 0; i < max(b, d); ++i)
    {
        for(int j = 0; j < a + c; ++j)
        {
            if(mapa[i][j])cout << char(mapa[i][j]  - 1 + 'a');
            else cout << ".";
        }
        cout << "\n";
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll a,b,c,d,n,ar[26],cnt=0;
    char str[51][51];
    cin>>a>>b>>c>>d>>n;

    for(ll i=0;i<n;i++)cin>>ar[i];

    for(ll i=max(b,d);i>=0;i--)
    {
        if(i%2==0)
        {
            for(ll j=0;j<a+c;j++)
            {
                if(j<a && i>=b){str[i][j]='.';continue;}
                if(j>=a && i>=d){str[i][j]='.';continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        else
        {
            for(ll j=a+c-1;j>=0;j--)
            {
                if(j<a && i>=b){str[i][j]='.';continue;}
                if(j>=a && i>=d){str[i][j]='.';continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
    }
    for(ll i=0;i<max(b,d);i++)
    {
        for(ll j=0;j<a+c;j++)
        {
            cout<<str[i][j];
        }
            cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll a,b,c,d,n,ar[26],cnt=0,st;
    char str[51][51];
    cin>>a>>b>>c>>d>>n;

    for(ll i=0;i<n;i++)cin>>ar[i];
    if(b>d)
    {
        if(b-d%2==0)st=2;
        else st=1;
    }
    else
    {
        if(d-b%2==0)st=1;
        else st=2;
    }
    cout<<"YES"<<endl;
    for(ll i=max(b,d);i>=0;i--)
    {
        if(st%2==0)
        {
            for(ll j=0;j<a+c;j++)
            {
                if(j<a && i>=b){str[i][j]='.';if(j==a+c-1)st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';if(j==a+c-1)st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        else
        {
            for(ll j=a+c-1;j>=0;j--)
            {
                if(j<a && i>=b){str[i][j]='.';if(j==0)st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';if(j==0)st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        st++;
    }
    for(ll i=0;i<max(b,d);i++)
    {
        for(ll j=0;j<a+c;j++)
        {
            cout<<str[i][j];
        }
            cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll a,b,c,d,n,ar[26],cnt=0,st;
    char str[200][200];
    cin>>a>>b>>c>>d>>n;

    for(ll i=0;i<n;i++)cin>>ar[i];
    if(b>d)
    {
        if(b-d%2==0)st=2;
        else st=1;
    }
    else
    {
        if(d-b%2==0)st=1;
        else st=2;
    }
    cout<<"YES"<<endl;
    for(ll i=max(b,d);i>=0;i--)
    {
        if(st%2==0)
        {
            for(ll j=0;j<a+c;j++)
            {
                if(j<a && i>=b){str[i][j]='.';if(j==a+c-1)st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';if(j==a+c-1)st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        else
        {
            for(ll j=a+c-1;j>=0;j--)
            {
                if(j<a && i>=b){str[i][j]='.';if(j==0)st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';if(j==0)st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        st++;
    }
    for(ll i=0;i<max(b,d);i++)
    {
        for(ll j=0;j<a+c;j++)
        {
            cout<<str[i][j];
        }
            cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll a,b,c,d,n,ar[26],cnt=0,st;
    char str[51][51];
    cin>>a>>b>>c>>d>>n;

    for(ll i=0;i<n;i++)cin>>ar[i];
    if(abs(b-d)%2==0)st=2;
    else st=1;
    cout<<"YES"<<endl;
    for(ll i=max(b,d);i>=0;i--)
    {
        if(st%2==0)
        {
            for(ll j=0;j<a+c;j++)
            {
                if(j<a && i>=b){str[i][j]='.';st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        else
        {
            for(ll j=a+c-1;j>=0;j--)
            {
                if(j<a && i>=b){str[i][j]='.';st++;continue;}
                if(j>=a && i>=d){str[i][j]='.';st++;continue;}
                if(ar[cnt]==0)cnt++;
                char ch=cnt+97;
                str[i][j]=ch;
                ar[cnt]--;
            }
        }
        st++;
    }
    for(ll i=0;i<max(b,d);i++)
    {
        for(ll j=0;j<a+c;j++)
        {
            cout<<str[i][j];
        }
            cout<<endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    sort(all(x));
    int i=0;
    bool tp=1;
    int j=n-1;
    if(b>d){
        for(int co=a+c-1;co>=0;co--){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    tp=0;
                    if((co-1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }else{

         for(int co=0;co<a+c;co++){
            while(x[j].f && j>=0){
                if(i==-1){
                    tp=1;
                    i=0;
                    break;
                }
                if((co>=a) && i==d){
                    if(A[0][co]==char(x[j].s+'a')){
                        tp=1;
                        i=0;
                        break;
                    }
                    tp=0;
                    if((co+1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                else if(co<a && i==b){
                    if(A[0][co]==char(x[j].s+'a')){
                        tp=1;
                        i=0;
                        continue;
                    }
                    tp=0;
                    if((co+1)>=a)i=d-1;
                    else i=b-1;
                    break;
                }
                A[i][co]=char(x[j].s+'a');
                if(tp) i++;
                else i--;
                x[j].f--;
                if(!x[j].f)j--;
    //            debug()<<imie(A);
            }
    //        if(!x[j]) j--;
        }
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    pii psd;
    sort(all(x));
    psd=x.back();x.pop_back();
    sort(rall(x));
    auto how=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                if(A[j][co]!='.') kl++;
            }
        }
        return kl;
    };
    int i=0;
    bool tp=1;
    int j=n-1;
    if(how()<=psd.f){
        x.insert(x.begin()+j,psd);
        psd.f=0;
    }
    for(int co=a+c-1;co>=0;co--){
        while(x[j].f && j>=0){
            if(i==-1){
                tp=1;
                i=0;
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            A[i][co]=char(x[j].s+'a');
            if(tp) i++;
            else i--;
            x[j].f--;
            if(!x[j].f){
                if(how()<=psd.f && psd.f){
                    x.insert(x.begin()+j,psd);
                    psd.f=0;
                }
                else j--;
            }
//            debug()<<imie(x);
        }
//        if(!x[j]) j--;
    }
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    pii psd;
    sort(all(x));
    psd=x.back();x.pop_back();
    sort(rall(x));
    auto how=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                if(A[j][co]=='.') kl++;
            }
        }
        return kl;
    };
    auto rev=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                swap(A[j][co],A[d-j-1][co]);
            }
        }
        return kl;
    };
    int i=0;
    bool tp=1;
    int j=n-2;
    bool ok=0;
    if(how()<=psd.f){
        x.insert(x.begin()+j,psd);
//        debug()<<imie(ok)<<imie(tp)<<imie(ok);
        psd.f=0;
    }
//    debug()<<imie(x);
    for(int co=a+c-1;co>=0;co--){
        while(x[j].f && j>=0){
//            debug()<<imie(x[j])<<imie(x);
            if(i==-1){
                tp=1;
                i=0;
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            A[i][co]=char(x[j].s+'a');
            if(tp) i++;
            else i--;
            x[j].f--;
            if(!x[j].f){
                if(how()<=psd.f && psd.f){
//                    if(tp==1) ok=1;
                    x.insert(x.begin()+j,psd);
                    psd.f=0;
//                    debug()<<imie(x)<<imie(ok);
                }
                else j--;
            }
//            debug()<<imie(x)<<imie(psd)<<imie(A);
        }
//        if(!x[j]) j--;
    }
//    if(ok) rev();
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/


#include<bits/stdc++.h>
using namespace std;
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//
//    #pragma GCC optimize("unroll-loops")
//    #pragma GCC optimize("Ofast")
//    #pragma GCC optimize("-O3")
//    #pragma GCC optimize("no-stack-protector")
//    #pragma GCC optimize("fast-math")
//#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define fi first
#define f first
#define se second
#define s second
#define vi_a vector<int>a;
#define p_b push_back
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ll long long
////////////////////////////////???????????????CHECK THIS OUT???????????????//////////////////////////////
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define m_p make_pair
#define fast_io cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
#define all(x) x.begin(),x.end()
#define getfiles    ifstream cin("input.txt");ofstream cout("output.txt");
#define pw(x) (1ll << x)
#define sz(x) (ll)x.size()
#define endl "\n"
#define rall(x) x.rbegin(),x.rend()
#define len(a) (ll)a.size()
#define rep(x,l,r) for(ll x=l;x<r;x++)

//using namespace __gnu_pbds;
ld eps = (ld)1 / 1e6;
const ld pi=3.14159265359;
ll inf = 1e18;
ll sqr(ll a) { return a * a; }
ll qb(ll a) { return a * a * a; }
ll gcd(ll a, ll b) { return !a ? b : gcd(b % a, a); }
ll binpow(ll a, ll b, ll mod) { return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod : sqr(binpow(a, b / 2, mod)) % mod) : 1; }
ll binmult(ll a, ll b, ll mod) { return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod : (2 * binmult(a, b / 2, mod)) % mod) : 0; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const ll R=1e4;
const ll tx[4]={0,0,-1,1};
const ll ty[4]={-1,1,0,0};
const char rev_to[4]={'E','W','N','S'};
const int N=1e6+1;
signed main(){
    fast_io;
    int a,b,c,d,n;
    cin>>a>>b>>c>>d>>n;
    vector<vector<char>>A(max(b,d),vector<char>(a+c,'.'));
    vector<pii>x(n);
    for(int i=0;i<n;i++){
        cin>>x[i].f;x[i].s=i;
    }
    pii psd;
    sort(all(x));
    psd=x.back();x.pop_back();
    sort(rall(x));
    auto how=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                if(A[j][co]=='.') kl++;
            }
        }
        return kl;
    };
    auto rev=[&](){
        int kl=0;
        for(int co=a+c-1;co>=a;co--){
            for(int j=0;j<d;j++){
                swap(A[j][co],A[d-j-1][co]);
            }
        }
        return kl;
    };
    int i=0;
    bool tp=1;
    int j=n-1;
      bool ok=0;
    if(how()<=psd.f){
        x.insert(x.begin()+j,psd);
//        debug()<<imie(ok)<<imie(tp)<<imie(ok);
        psd.f=0;
    }
    for(int co=a+c-1;co>=0;co--){
        while(x[j].f && j>=0){
            if(i==-1){
                tp=1;
                i=0;
                break;
            }
            if((co>=a) && i==d){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            else if(co<a && i==b){
                tp=0;
                if((co-1)>=a)i=d-1;
                else i=b-1;
                break;
            }
            A[i][co]=char(x[j].s+'a');
            if(tp) i++;
            else i--;
            x[j].f--;
            if(!x[j].f){
                if(how()<=psd.f && psd.f){
//                    if(tp==1) ok=1;
                    x.insert(x.begin()+j,psd);
                    psd.f=0;
//                    debug()<<imie(x)<<imie(ok);
                }
                else j--;
            }
//            debug()<<imie(x);
        }
//        if(!x[j]) j--;
    }
//    if(ok) rev();
    cout<<"YES\n";
    for(auto &z : A){
        for(auto &g : z) cout<<g;
        cout<<endl;
    }
    return 0;
}
///stuff you should look for :
/*
9 3
1 4 8 1 2
1 1 9 3 1
2 6
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* read the conditions carefully
	* WRITE STUFF DOWN
    * если WA , то чекер говно, поэтому почекай l8 строчку
    * бфс обновляем
    * не дизморалимся и решаем контест полностью , если не получается с таской,  передыхаем или переходим к некст
*/