#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;

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

    rep(i, b)
    {
        rep(j, a) cout << 0;
        for (int j = a; j < w; j++)
            cout << 1;
        cout << endl;
    }
    for (int i = b; i < h; i++)
    {
        rep(j, a) cout << 1;
        for (int j = a; j < w; j++)
            cout << 0;
        cout << endl;
    }
}
#include <bits/stdc++.h>
using namespace std;
int main(void){
    
    /*
    int a, b;
    cin >> a >> b ;
    //*/

    //*
    vector<int> vec(3);
    cin >> vec.at(0) >> vec.at(1) >> vec.at(2) ;
    
    sort(vec.begin(), vec.end());
    //*/
    
    /*
    if( a < 6 ){
        cout << 0 << endl;
    } else if (a < 13){
        cout << b / 2 << endl;
    } else {
        cout << b << endl;
    }
    //*/
    
    cout << vec.at(0) + vec.at(1) << endl;

    return 0; 
}
