#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;

#define REP(i, n, m) for(ll i=n; i<(ll)m; ++i)
#define IREP(i, n, m) for(ll i=n-1; i>=m; --i)
#define rep(i, n) REP(i, 0, n)
#define irep(i, n) IREP(i, n, 0)
#define all(v) v.begin(), v.end()

int main(){
    ll h, w, a, b;
    cin >> h >> w >> a >> b;

    vvll s(h, vll(w, 0));
    vll sh0(h, 0), sh1(h, 0), sw0(w, 0), sw1(w, 0);
    rep(i, h){
        rep(j, w){
            if(min(sh0[i], sh1[i])<a){
                if(min(sw0[j], sw1[j])<b){
                    if(sw0[j]<sw1[j]){
                        s[i][j] = 0;
                        ++sh0[i];
                        ++sw0[j];
                    }
                    else if(sw0[j]>sw1[j]){
                        s[i][j] = 1;
                        ++sh1[i];
                        ++sw1[j];
                    }
                    else if(sh0[i]<sh1[i]){
                        s[i][j] = 0;
                        ++sh0[i];
                        ++sw0[j];
                    }
                    else{
                        s[i][j] = 1;
                        ++sh1[i];
                        ++sw1[j];
                    }
                }
                else if(sw0[j]<sw1[j]){
                    s[i][j] = 1;
                    ++sh1[i];
                    ++sw1[j];
                }
                else if(sw0[j]==sw1[j]){
                    if(sh0[i]<sh1[i]){
                        s[i][j] = 0;
                        ++sh0[i];
                        ++sw0[j];
                    }
                    else{
                        s[i][j] = 1;
                        ++sh1[i];
                        ++sw1[j];
                    }
                }
                else{
                    s[i][j] = 0;
                    ++sh0[i];
                    ++sw0[j];
                }
            }
            else if(sh0[i]<sh1[i]){
                if(min(sw0[j], sw1[j])<b){
                    s[i][j] = 1;
                    ++sh1[i];
                    ++sw1[j];
                }
                else if(sw0[j]<=sw1[j]){
                    s[i][j] = 1;
                    ++sh1[i];
                    ++sw1[j];
                }
                else{
                    cout << "No" << endl;
                    return 0;
                }
            }
            else if(sh0[i]==sh1[i]){
                if(min(sw0[j], sw1[j])<b){
                    if(sw0[j]<sw1[j]){
                        s[i][j] = 0;
                        ++sh0[i];
                        ++sw0[j];
                    }
                    else{
                        s[i][j] = 1;
                        ++sh1[i];
                        ++sw1[j];
                    }
                }
                else if(sw0[j]<=sw1[j]){
                    s[i][j] = 1;
                    ++sh1[i];
                    ++sw1[j];
                }
                else{
                    s[i][j] = 0;
                    ++sh0[i];
                    ++sw0[j];
                }
            }
            else{
                if(min(sw0[j], sw1[j])<b){
                    s[i][j] = 0;
                    ++sh0[i];
                    ++sw0[j];
                }
                else if(sw0[j]>=sw1[j]){
                    s[i][j] = 0;
                    ++sh0[i];
                    ++sw0[j];
                }
                else{
                    cout << "No" << endl;
                    return 0;
                }
            }
            if(min(sw0[j], sw1[j])>b){
                cout << "No" << endl;
                return 0;
            }
        }
        if(min(sh0[i], sh1[i])!=a){
            cout << "No" << endl;
            return 0;
        }
    }
    rep(j, w){
        if(min(sw0[j], sw1[j])!=b){
            cout << "No" << endl;
            return 0;
        }
    }
    rep(i, h){
        rep(j, w){
            cout << s[i][j];
        }
        cout << endl;
    }
}


Measured memory_bytes: 9088