h, w, a, b = map(int, input().split())
d = [[0]*w for _ in range(h)]
for i in range(b):
    for j in range(a, w):
        d[i][j] = 1
for i in range(a):
    for j in range(b, h):
        d[j][i] = 1
for i in d: print(*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 [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w d = [[0]*w for _ in range(h)] d [[0]*w for _ in range(h)] for i in range(b):
    for j in range(a, w):
        d[i][j] = 1 i range(b) range b for j in range(a, w):
        d[i][j] = 1 j range(a, w) range a w d[i][j] = 1 d[i][j] [i] d i j 1 for i in range(a):
    for j in range(b, h):
        d[j][i] = 1 i range(a) range a for j in range(b, h):
        d[j][i] = 1 j range(b, h) range b h d[j][i] = 1 d[j][i] [j] d j i 1 for i in d: print(*i, sep="") i d w, a, b = map(int, input().split()) map(int, input().split()) w b = map(int, input().split()) map(int, input().split()) b h, w, a, b = map(int, input().split()) map(int, input().split()) h d = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] d a, b = map(int, input().split()) map(int, input().split()) a
h, w, a, b = map(int, input().split())
d = [[0]*w for _ in range(h)]
for i in range(b):
    for j in range(a, w):
        d[i][j] = 1
for i in range(a):
    for j in range(b, h):
        d[j][i] = 1
for i in d: print(*i, sep="")