H, W, A, B = map(int, input().split())

ans = []

for _ in range(H - B):
    a = ['0'] * (W - A)
    a.extend(['1'] * A)
    ans.append(a)
for _ in range(B):
    a = ['1'] * (W - A)
    a.extend(['0'] * A)
    ans.append(a)

for a in ans:
    print(*a, sep='') 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 - B):
    a = ['0'] * (W - A)
    a.extend(['1'] * A)
    ans.append(a) _ range(H - B) range H - B H B a = ['0'] * (W - A) a ['0'] * (W - A) ['0'] '0' W - A W A a.extend(['1'] * A) a.extend a extend ['1'] * A ['1'] '1' A ans.append(a) ans.append ans append a for _ in range(B):
    a = ['1'] * (W - A)
    a.extend(['0'] * A)
    ans.append(a) _ range(B) range B a = ['1'] * (W - A) a ['1'] * (W - A) ['1'] '1' W - A W A a.extend(['0'] * A) a.extend a extend ['0'] * A ['0'] '0' A ans.append(a) ans.append ans append a for a in ans:
    print(*a, sep='') a ans print(*a, sep='') print *a a sep='' sep '' A, B = map(int, input().split()) map(int, input().split()) A a = ['1'] * (W - A) ['1'] * (W - A) a ans = [] [] ans B = map(int, input().split()) map(int, input().split()) B a = ['0'] * (W - A) ['0'] * (W - A) a W, A, B = map(int, input().split()) map(int, input().split()) W 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 - B):
    a = ['0'] * (W - A)
    a.extend(['1'] * A)
    ans.append(a)
for _ in range(B):
    a = ['1'] * (W - A)
    a.extend(['0'] * A)
    ans.append(a)

for a in ans:
    print(*a, sep='')
