H, W, A, B = map(int,input().split())
S = [1] * A + [0] * (W - A)
T = [0] * A + [1] * (W - A)
s = ""
t = ""
for a in S:
    s += str(a)
for b in T:
    t += str(b)
for _ in range(B):
    print(s)
for _ in range(H - B):
    print(t) H, W, A, B = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B S = [1] * A + [0] * (W - A) S [1] * A + [0] * (W - A) [1] * A [1] 1 A [0] * (W - A) [0] 0 W - A W A T = [0] * A + [1] * (W - A) T [0] * A + [1] * (W - A) [0] * A [0] 0 A [1] * (W - A) [1] 1 W - A W A s = "" s "" t = "" t "" for a in S:
    s += str(a) a S s += str(a) s str(a) str a for b in T:
    t += str(b) b T t += str(b) t str(b) str b for _ in range(B):
    print(s) _ range(B) range B print(s) print s for _ in range(H - B):
    print(t) _ range(H - B) range H - B H B print(t) print t t = "" "" t B = map(int,input().split()) map(int,input().split()) B 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 A, B = map(int,input().split()) map(int,input().split()) A T = [0] * A + [1] * (W - A) [0] * A + [1] * (W - A) T s += str(a) str(a) s t += str(b) str(b) t S = [1] * A + [0] * (W - A) [1] * A + [0] * (W - A) S s = "" "" s
H, W, A, B = map(int,input().split())
S = [1] * A + [0] * (W - A)
T = [0] * A + [1] * (W - A)
s = ""
t = ""
for a in S:
    s += str(a)
for b in T:
    t += str(b)
for _ in range(B):
    print(s)
for _ in range(H - B):
    print(t)