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

ret = [['0'] * W for _ in range(H)]

A, B = B, A
for y in range(A) :
    for x in range(B, W) :
        ret[y][x] = '1'

for y in range(A, H) :
    for x in range(B) :
        ret[y][x] = '1'
        
for y in range(H) :
    print(''.join(ret[y])) H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B ['0'] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) ['0'] * W ['0'] '0' W ret = [['0'] * W for _ in range(H)] ret [['0'] * W for _ in range(H)] A, B = B, A A B B A for y in range(A) :
    for x in range(B, W) :
        ret[y][x] = '1' y range(A) range A for x in range(B, W) :
        ret[y][x] = '1' x range(B, W) range B W ret[y][x] = '1' ret[y][x] [y] ret y x '1' for y in range(A, H) :
    for x in range(B) :
        ret[y][x] = '1'
         y range(A, H) range A H for x in range(B) :
        ret[y][x] = '1'
         x range(B) range B ret[y][x] = '1' ret[y][x] [y] ret y x '1' for y in range(H) :
    print(''.join(ret[y])) y range(H) range H print(''.join(ret[y])) print ''.join(ret[y]) ''.join '' join ret[y] ret y W, A, B = map(int, input().split()) map(int, input().split()) W A, B = map(int, input().split()) map(int, input().split()) A B = B, A A B H, W, A, B = map(int, input().split()) map(int, input().split()) H ret = [['0'] * W for _ in range(H)] [['0'] * W for _ in range(H)] ret A, B = B, A B A B = map(int, input().split()) map(int, input().split()) B
H, W, A, B = map(int, input().split())

ret = [['0'] * W for _ in range(H)]

A, B = B, A
for y in range(A) :
    for x in range(B, W) :
        ret[y][x] = '1'

for y in range(A, H) :
    for x in range(B) :
        ret[y][x] = '1'
        
for y in range(H) :
    print(''.join(ret[y]))