h, w, a, b = map(int, input().split())

ans = []
for i in range(h):
    tmp = []
    for j in range(w):
        tmp.append(str((1 if i<b else 0)^(1 if j<a else 0)))
    ans.append(tmp)

for l in ans:
    print("".join(l)) 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 i in range(h):
    tmp = []
    for j in range(w):
        tmp.append(str((1 if i<b else 0)^(1 if j<a else 0)))
    ans.append(tmp) i range(h) range h tmp = [] tmp [] for j in range(w):
        tmp.append(str((1 if i<b else 0)^(1 if j<a else 0)))
     j range(w) range w tmp.append(str((1 if i<b else 0)^(1 if j<a else 0))) tmp.append tmp append str((1 if i<b else 0)^(1 if j<a else 0)) str (1 if i<b else 0)^(1 if j<a else 0) 1 if i<b else 0 i<b i b 1 0 1 if j<a else 0 j<a j a 1 0 ans.append(tmp) ans.append ans append tmp for l in ans:
    print("".join(l)) l ans print("".join(l)) print "".join(l) "".join "" join l ans = [] [] ans a, b = map(int, input().split()) map(int, input().split()) a h, w, a, b = map(int, input().split()) map(int, input().split()) h b = map(int, input().split()) map(int, input().split()) b w, a, b = map(int, input().split()) map(int, input().split()) w tmp = [] [] tmp
h, w, a, b = map(int, input().split())

ans = []
for i in range(h):
    tmp = []
    for j in range(w):
        tmp.append(str((1 if i<b else 0)^(1 if j<a else 0)))
    ans.append(tmp)

for l in ans:
    print("".join(l))