h,w,a,b = map(int, input().split())
x = w-a
y = h-b
p = "0"*x + "1"*a
q = "1"*x + "0"*a
for i in range(b):
    print(p)
for i in range(y):
    print(q) h,w,a,b = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w a b x = w-a x w-a w a y = h-b y h-b h b p = "0"*x + "1"*a p "0"*x + "1"*a "0"*x "0" x "1"*a "1" a q = "1"*x + "0"*a q "1"*x + "0"*a "1"*x "1" x "0"*a "0" a for i in range(b):
    print(p) i range(b) range b print(p) print p for i in range(y):
    print(q) i range(y) range y print(q) print q p = "0"*x + "1"*a "0"*x + "1"*a p x = w-a w-a x y = h-b h-b y w,a,b = map(int, input().split()) map(int, input().split()) w b = map(int, input().split()) map(int, input().split()) b a,b = map(int, input().split()) map(int, input().split()) a q = "1"*x + "0"*a "1"*x + "0"*a q h,w,a,b = map(int, input().split()) map(int, input().split()) h
h,w,a,b = map(int, input().split())
x = w-a
y = h-b
p = "0"*x + "1"*a
q = "1"*x + "0"*a
for i in range(b):
    print(p)
for i in range(y):
    print(q)