#include <sstream>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<ctime>
#include<cmath>
#include<map>
#include<unordered_map>
#include<stack>
#include<random>
#include<queue>
#include<list>
#include<math.h>
#include<bitset>
#include<fstream>
#include<stdint.h>
using namespace std;
#define ll unsigned long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mul(x,y) ((ll)(x)*(y))%mod
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forn(i, n) for (int i = 0; i < int(n); i++)
#include<fstream>
const ll INF=9223372036854775807;
const ll mod=998244353;
int  MOD(int  a, int  b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
ll  max3(ll  a,ll  b, ll  c)
{
    return max(c,max(a,b));
}
ll min3(ll  a,ll  b,ll  c)
{
    return min(a,min(b,c));
}
ll  power(ll  x,ll  y,ll mod1)
{
    ll res = 1;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x)%mod1;
        y = y>>1;
        x = (x*x)%mod1;
    }
    return res;
}
ll logg(ll  a)
{
    ll  x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
ll  gcd(ll  a,ll   b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}
ll abso(ll x)
{
    if(x<0)
    {
        return -x;
    }
    return x;
}
ll ceiling (ll  a,ll  b)
{
    if(a%b==0)
    {
        return a/b;
    }
    else
    {
        return a/b+1;
    }
}
ll modinv(ll x,ll p)
{
    return power(x,p-2,p);
}
const uint64_t pow_10[20] = {
    UINT64_C(1),
    UINT64_C(10),
    UINT64_C(100),
    UINT64_C(1000),
    UINT64_C(10000),
    UINT64_C(100000),
    UINT64_C(1000000),
    UINT64_C(10000000),
    UINT64_C(100000000),
    UINT64_C(1000000000),
    UINT64_C(10000000000),
    UINT64_C(100000000000),
    UINT64_C(1000000000000),
    UINT64_C(10000000000000),
    UINT64_C(100000000000000),
    UINT64_C(1000000000000000),
    UINT64_C(10000000000000000),
    UINT64_C(100000000000000000),
    UINT64_C(1000000000000000000),
    UINT64_C(10000000000000000000)
};

int A007376(uint64_t i)
{
    uint64_t     digits = 1U;
    uint64_t     value  = 1U;
    uint64_t     limit  = 9U;
    unsigned int tens;
    
    /* The sequence starts at index 1. Shift to zero. */
    if (!i--)
        return 0;
    
    /* Find the number of digits in each number
     in the region of index i. */
    while (i/limit >= digits) {
        const uint64_t old_limit = limit;
        
        i -= digits * limit;
        
        digits++;
        value *= 10U;
        limit *= 10U;
        
        /* If limit overflows, we are in the correct, final region. */
        if (limit <= old_limit)
            break;
    }
    
    /* We know the desired digit is i'th digit
     in a string formed by concatenating the
     9*10^(digits-1) numbers starting at 10^(digits-1).
     The value of this number is pow10(digits-1) + i/digits: */
    value += i / digits;
    
#ifdef DEBUG_OUTPUT
    fprintf(stderr, "Digit %d of %" PRIu64 " ", 1 + (int)(i % digits), value);
#endif
    
    /* Move the desired digit into the ones position. */
    value /= pow_10[(digits - 1) - (i % digits)];
    
#ifdef DEBUG_OUTPUT
    fprintf(stderr, "= %d\n", (int)(value % 10U));
#endif
    
    return value % 10U;
}
int findNthDigit(ll m) {
    ll n=m; // convert int to long
    ll start=1,  len=1,  count=9;
    
    while(n>len*count){
        n=n-len*count;
        len++;
        count=count*10;
        start=start*10;
    }
    
    // identify the number
    start = start + (n-1)/len;
    
    // identify the digit
    return (to_string(start)[((n-1)%len)]-'0');
}




ll func(ll x)
{
    if(x==0)
    {
        return 0;
    }
    ll sz=1;ll num=1;
    ll sum=0;ll last=0;
    while(sz*10<=x)
    {
        ll y=sz*10-sz;
        sum+=num*((y)*(y+1)/2);
        last=last+(sz*10-sz)*num;
        sz=sz*10;
        num++;
    }
    ll occ=x-sz+1;
    sum+=(occ)*last+(occ*(occ+1)/2)*num;
    return sum;
}
int main()
{
    fastio;
    int h,w,a,b;
    cin>>h>>w>>a>>b;
    vector<string> g(h);
    for(int i=0;i<h-b;i++)
    {
        g[i].resize(w);
        for(int j=0;j<a;j++)
        {
            g[i][j]='0';
        }
        for(int j=a;j<w;j++)
        {
            g[i][j]='1';
        }
    }
    for(int i=h-b;i<h;i++)
    {
        g[i].resize(w);
        for(int j=0;j<a;j++)
        {
            g[i][j]='1';
        }
        for(int j=a;j<w;j++)
        {
            g[i][j]='0';
        }
    }
    for(int i=0;i<h;i++)
    {
        cout<<g[i]<<endl;
    }
}


Measured memory_bytes: 2304