H, W, A, B = map(int, input().split())
ans = [[0] * W for _ in range(H)]
row = [W-A] * H
column = [H-B] * W
for h in range(H):
    for w in range(W):
        if row[h] == 0:
            pass
        elif column[w] == 0 :
            pass
        else:
            ans[h][w] = 1
            row[h] -= 1
            column[w] -= 1

for row in ans:
    print(*row, sep="") H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W ans = [[0] * W for _ in range(H)] ans [[0] * W for _ in range(H)] row = [W-A] * H row [W-A] * H [W-A] W-A W A H column = [H-B] * W column [H-B] * W [H-B] H-B H B W for h in range(H):
    for w in range(W):
        if row[h] == 0:
            pass
        elif column[w] == 0 :
            pass
        else:
            ans[h][w] = 1
            row[h] -= 1
            column[w] -= 1 h range(H) range H for w in range(W):
        if row[h] == 0:
            pass
        elif column[w] == 0 :
            pass
        else:
            ans[h][w] = 1
            row[h] -= 1
            column[w] -= 1 w range(W) range W if row[h] == 0:
            pass
        elif column[w] == 0 :
            pass
        else:
            ans[h][w] = 1
            row[h] -= 1
            column[w] -= 1 row[h] == 0 row[h] row h 0 elif column[w] == 0 :
            pass
         column[w] == 0 column[w] column w 0 ans[h][w] = 1 ans[h][w] [h] ans h w 1 row[h] -= 1 row[h] row h 1 column[w] -= 1 column[w] column w 1 for row in ans:
    print(*row, sep="") row ans print(*row, sep="") print *row row sep="" sep "" A, B = map(int, input().split()) map(int, input().split()) A H, W, A, B = map(int, input().split()) map(int, input().split()) H ans = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] ans B = map(int, input().split()) map(int, input().split()) B row = [W-A] * H [W-A] * H row column = [H-B] * W [H-B] * W column W, A, B = map(int, input().split()) map(int, input().split()) W
H, W, A, B = map(int, input().split())
ans = [[0] * W for _ in range(H)]
row = [W-A] * H
column = [H-B] * W
for h in range(H):
    for w in range(W):
        if row[h] == 0:
            pass
        elif column[w] == 0 :
            pass
        else:
            ans[h][w] = 1
            row[h] -= 1
            column[w] -= 1

for row in ans:
    print(*row, sep="")
