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

X="".join(map(str,[1]*A+[0]*(W-A)))+"\n"
Y="".join(map(str,[0]*A+[1]*(W-A)))+"\n"

print((X*B+Y*(H-B))[:-1]) H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B X="".join(map(str,[1]*A+[0]*(W-A)))+"\n" X "".join(map(str,[1]*A+[0]*(W-A)))+"\n" "".join(map(str,[1]*A+[0]*(W-A))) "".join "" join map(str,[1]*A+[0]*(W-A)) map str [1]*A+[0]*(W-A) [1]*A [1] 1 A [0]*(W-A) [0] 0 W-A W A "\n" Y="".join(map(str,[0]*A+[1]*(W-A)))+"\n" Y "".join(map(str,[0]*A+[1]*(W-A)))+"\n" "".join(map(str,[0]*A+[1]*(W-A))) "".join "" join map(str,[0]*A+[1]*(W-A)) map str [0]*A+[1]*(W-A) [0]*A [0] 0 A [1]*(W-A) [1] 1 W-A W A "\n" print((X*B+Y*(H-B))[:-1]) print (X*B+Y*(H-B))[:-1] X*B+Y*(H-B) X*B X B Y*(H-B) Y H-B H B :-1 -1 B=map(int,input().split()) map(int,input().split()) B H,W,A,B=map(int,input().split()) map(int,input().split()) H X="".join(map(str,[1]*A+[0]*(W-A)))+"\n" "".join(map(str,[1]*A+[0]*(W-A)))+"\n" X Y="".join(map(str,[0]*A+[1]*(W-A)))+"\n" "".join(map(str,[0]*A+[1]*(W-A)))+"\n" Y W,A,B=map(int,input().split()) map(int,input().split()) W A,B=map(int,input().split()) map(int,input().split()) A
H,W,A,B=map(int,input().split())

X="".join(map(str,[1]*A+[0]*(W-A)))+"\n"
Y="".join(map(str,[0]*A+[1]*(W-A)))+"\n"

print((X*B+Y*(H-B))[:-1])