h,w,a,b=map(int,input().split())
s = "0"*a+"1"*(w-a)
t = "1"*a+"0"*(w-a)
for _ in range(h-b):
    print(s)
for _ in range(b):
    print(t) 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) s "0"*a+"1"*(w-a) "0"*a "0" a "1"*(w-a) "1" w-a w a t = "1"*a+"0"*(w-a) t "1"*a+"0"*(w-a) "1"*a "1" a "0"*(w-a) "0" w-a w a for _ in range(h-b):
    print(s) _ range(h-b) range h-b h b print(s) print s for _ in range(b):
    print(t) _ range(b) range b print(t) print t s = "0"*a+"1"*(w-a) "0"*a+"1"*(w-a) s 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 b=map(int,input().split()) map(int,input().split()) b t = "1"*a+"0"*(w-a) "1"*a+"0"*(w-a) t a,b=map(int,input().split()) map(int,input().split()) a
h,w,a,b=map(int,input().split())
s = "0"*a+"1"*(w-a)
t = "1"*a+"0"*(w-a)
for _ in range(h-b):
    print(s)
for _ in range(b):
    print(t)