h, w, a, b = map(int, input().split())
ans = []
for _ in range(h):
    ans.append([0 for __ in range(w)])
for i in range(b):
    for j in range(w):
        ans[i][j] = (ans[i][j]+1)%2
for i in range(a):
    for j in range(h):
        ans[j][i] = (ans[j][i]+1)%2
for i in range(h):
    for j in range(w):
        if j != w-1:
            print(ans[i][j], end="")
        else:
            print(ans[i][j]) h, w, a, b = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w a b ans = [] ans [] for _ in range(h):
    ans.append([0 for __ in range(w)]) _ range(h) range h 0 for __ in range(w) for __ in range(w) __ range(w) range w for __ in range(w) 0 ans.append([0 for __ in range(w)]) ans.append ans append [0 for __ in range(w)] for i in range(b):
    for j in range(w):
        ans[i][j] = (ans[i][j]+1)%2 i range(b) range b for j in range(w):
        ans[i][j] = (ans[i][j]+1)%2 j range(w) range w ans[i][j] = (ans[i][j]+1)%2 ans[i][j] [i] ans i j (ans[i][j]+1)%2 ans[i][j]+1 ans[i][j] [i] ans i j 1 2 for i in range(a):
    for j in range(h):
        ans[j][i] = (ans[j][i]+1)%2 i range(a) range a for j in range(h):
        ans[j][i] = (ans[j][i]+1)%2 j range(h) range h ans[j][i] = (ans[j][i]+1)%2 ans[j][i] [j] ans j i (ans[j][i]+1)%2 ans[j][i]+1 ans[j][i] [j] ans j i 1 2 for i in range(h):
    for j in range(w):
        if j != w-1:
            print(ans[i][j], end="")
        else:
            print(ans[i][j]) i range(h) range h for j in range(w):
        if j != w-1:
            print(ans[i][j], end="")
        else:
            print(ans[i][j]) j range(w) range w if j != w-1:
            print(ans[i][j], end="")
        else:
            print(ans[i][j]) j != w-1 j w-1 w 1 print(ans[i][j], end="") print ans[i][j] [i] ans i j end="" end "" print(ans[i][j]) print ans[i][j] [i] ans i j a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b w, a, b = map(int, input().split()) map(int, input().split()) w ans = [] [] ans h, w, a, b = map(int, input().split()) map(int, input().split()) h
h, w, a, b = map(int, input().split())
ans = []
for _ in range(h):
    ans.append([0 for __ in range(w)])
for i in range(b):
    for j in range(w):
        ans[i][j] = (ans[i][j]+1)%2
for i in range(a):
    for j in range(h):
        ans[j][i] = (ans[j][i]+1)%2
for i in range(h):
    for j in range(w):
        if j != w-1:
            print(ans[i][j], end="")
        else:
            print(ans[i][j])