def main(H,W,A,B):
    ans = [[] for _ in range(H)]
    #print(ans)
    cntB = 0
    for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
    return ans

H,W,A,B = map(int,input().split())
ans = main(H,W,A,B)
for i in range(H):
    tmp = ans[i]
    tmp = map(str,tmp)
    print(''.join(tmp)) def main(H,W,A,B):
    ans = [[] for _ in range(H)]
    #print(ans)
    cntB = 0
    for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
    return ans main [] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [] ans = [[] for _ in range(H)] ans [[] for _ in range(H)] cntB = 0 cntB 0 for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
     i range(H) range H cntB += 1 cntB 1 cntA = 1 cntA 1 for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
     j range(W) range W if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
     cntB <= B cntB B if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
             cntA <= A cntA A ans[i].append(0) [i].append [i] ans i append 0 cntA += 1 cntA 1 ans[i].append(1) [i].append [i] ans i append 1 if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
     cntA <= A cntA A ans[i].append(1) [i].append [i] ans i append 1 cntA += 1 cntA 1 ans[i].append(0) [i].append [i] ans i append 0 return ans ans H H W W A A B B H,W,A,B = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B ans = main(H,W,A,B) ans main(H,W,A,B) main H W A B for i in range(H):
    tmp = ans[i]
    tmp = map(str,tmp)
    print(''.join(tmp)) i range(H) range H tmp = ans[i] tmp ans[i] ans i tmp = map(str,tmp) tmp map(str,tmp) map str tmp print(''.join(tmp)) print ''.join(tmp) ''.join '' join tmp def main(H,W,A,B):
    ans = [[] for _ in range(H)]
    #print(ans)
    cntB = 0
    for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
    return ans def main(H,W,A,B):
    ans = [[] for _ in range(H)]
    #print(ans)
    cntB = 0
    for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
    return ans main A,B = map(int,input().split()) map(int,input().split()) A W,A,B = map(int,input().split()) map(int,input().split()) W B = map(int,input().split()) map(int,input().split()) B ans = main(H,W,A,B) main(H,W,A,B) ans tmp = map(str,tmp) map(str,tmp) tmp tmp = ans[i] ans[i] tmp H,W,A,B = map(int,input().split()) map(int,input().split()) H
def main(H,W,A,B):
    ans = [[] for _ in range(H)]
    #print(ans)
    cntB = 0
    for i in range(H):
        cntB += 1
        cntA = 1
        for j in range(W):
            if cntB <= B:
                if cntA <= A:
                    ans[i].append(0)
                    cntA += 1
                else:
                    ans[i].append(1)
            else:
                if cntA <= A:
                    ans[i].append(1)
                    cntA += 1
                else:
                    ans[i].append(0)
    return ans

H,W,A,B = map(int,input().split())
ans = main(H,W,A,B)
for i in range(H):
    tmp = ans[i]
    tmp = map(str,tmp)
    print(''.join(tmp))
