H,W,A,B=map(int, input().split())
S=["0"*A+"1"*(W-A)]*B+["1"*A+"0"*(W-A)]*(H-B)
print(*S, sep="\n") H,W,A,B=map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B S=["0"*A+"1"*(W-A)]*B+["1"*A+"0"*(W-A)]*(H-B) S ["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" A "1"*(W-A) "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" A "0"*(W-A) "0" W-A W A H-B H B print(*S, sep="\n") print *S S sep="\n" sep "\n" A,B=map(int, input().split()) map(int, input().split()) A B=map(int, input().split()) map(int, input().split()) B W,A,B=map(int, input().split()) map(int, input().split()) W H,W,A,B=map(int, input().split()) map(int, input().split()) H S=["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) S
H,W,A,B=map(int, input().split())
S=["0"*A+"1"*(W-A)]*B+["1"*A+"0"*(W-A)]*(H-B)
print(*S, sep="\n")