h,w,a,b = map(int, input().split( ))

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

s1 = "0"*a+"1"*(w-a)
s2 = "1"*a + "0"*(w-a)
for _ in range(b):
    print(s1)
for _ in range(h-b):
    print(s2)