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

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

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