#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
#define ALL(v) v.begin(), v.end()
#define vmax(v) *max_element(ALL(v))
#define vmin(v) *min_element(ALL(v))
#define chmax(x, a) x = max(x, a)
#define chmin(x, a) x = min(x, a)

int main() {
    int H, W, A, B; cin >> H >> W >> A >> B;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (j < A && i < B) cout << 1;
            else if (j >= A && i >= B) cout << 1;
            else cout << 0;
        }
        cout << endl;
    }
}

#include <bits/stdc++.h>
using namespace std;
typedef pair<char,int> P;
char S[1000001];
vector<P> V;
int main() {
    scanf("%s",S);
    char ch=S[0];
    int cnt=0;
    for(int i=0;S[i]!='\0';i++) {
        if(ch==S[i]) {
            cnt++;
        }else {
            V.push_back(P(ch,cnt));
            cnt=1;
            ch=S[i];  
        }
    }
    V.push_back(P(ch,cnt));
    int ans=0;
    for(int i=0;i+2<V.size();i++) {
        if(V[i].first!='J'||V[i+1].first!='O'||V[i+2].first!='I') continue;
        if(V[i].second>=V[i+1].second&&V[i+2].second>=V[i+1].second) {
            ans=max(ans,V[i+1].second);
        }
    }
    printf("%d\n",ans);
}