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

t = [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B)

for t_i in t:
    print(*t_i, sep="") H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B t = [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B) t [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B) [[0]*A + [1]*(W-A)]*B [[0]*A + [1]*(W-A)] [0]*A + [1]*(W-A) [0]*A [0] 0 A [1]*(W-A) [1] 1 W-A W A B [[1]*A + [0]*(W-A)]*(H-B) [[1]*A + [0]*(W-A)] [1]*A + [0]*(W-A) [1]*A [1] 1 A [0]*(W-A) [0] 0 W-A W A H-B H B for t_i in t:
    print(*t_i, sep="") t_i t print(*t_i, sep="") print *t_i t_i sep="" sep "" W, A, B = map(int, input().split()) map(int, input().split()) W B = map(int, input().split()) map(int, input().split()) B A, B = map(int, input().split()) map(int, input().split()) A t = [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B) [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B) t H, W, A, B = map(int, input().split()) map(int, input().split()) H
H, W, A, B = map(int, input().split())

t = [[0]*A + [1]*(W-A)]*B + [[1]*A + [0]*(W-A)]*(H-B)

for t_i in t:
    print(*t_i, sep="")
