h,w,a,b=map(int,input().split())
l1=[]
l2=[]
for c in range(a):
    l1.append("0")
    l2.append("1")
for c in range(w-a):
    l1.append("1")
    l2.append("0")
s1="".join(l1)
s2="".join(l2)
for c in range(b):
    print(s1)
for c in range(h-b):
    print(s2) h,w,a,b=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b l1=[] l1 [] l2=[] l2 [] for c in range(a):
    l1.append("0")
    l2.append("1") c range(a) range a l1.append("0") l1.append l1 append "0" l2.append("1") l2.append l2 append "1" for c in range(w-a):
    l1.append("1")
    l2.append("0") c range(w-a) range w-a w a l1.append("1") l1.append l1 append "1" l2.append("0") l2.append l2 append "0" s1="".join(l1) s1 "".join(l1) "".join "" join l1 s2="".join(l2) s2 "".join(l2) "".join "" join l2 for c in range(b):
    print(s1) c range(b) range b print(s1) print s1 for c in range(h-b):
    print(s2) c range(h-b) range h-b h b print(s2) print s2 b=map(int,input().split()) map(int,input().split()) b l1=[] [] l1 s1="".join(l1) "".join(l1) s1 a,b=map(int,input().split()) map(int,input().split()) a h,w,a,b=map(int,input().split()) map(int,input().split()) h w,a,b=map(int,input().split()) map(int,input().split()) w s2="".join(l2) "".join(l2) s2 l2=[] [] l2
h,w,a,b=map(int,input().split())
l1=[]
l2=[]
for c in range(a):
    l1.append("0")
    l2.append("1")
for c in range(w-a):
    l1.append("1")
    l2.append("0")
s1="".join(l1)
s2="".join(l2)
for c in range(b):
    print(s1)
for c in range(h-b):
    print(s2)