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

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

s = '0' * a + '1' * (w - a)
t = '1' * a + '0' * (w - a)
for _ in range(b):
    print(s)
for _ in range(h - b):
    print(t)
