h,w,a,b = map(int,input().split())
ans = []
for _ in range(h-b):
    l = '0' * (w-a) + '1' * a
    ans.append(l)
for _ in range(b):
    l = '1' * (w-a) + '0' * a
    ans.append(l)
for i in range(h):
    print(''.join(ans[i])) h,w,a,b = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b ans = [] ans [] for _ in range(h-b):
    l = '0' * (w-a) + '1' * a
    ans.append(l) _ range(h-b) range h-b h b l = '0' * (w-a) + '1' * a l '0' * (w-a) + '1' * a '0' * (w-a) '0' w-a w a '1' * a '1' a ans.append(l) ans.append ans append l for _ in range(b):
    l = '1' * (w-a) + '0' * a
    ans.append(l) _ range(b) range b l = '1' * (w-a) + '0' * a l '1' * (w-a) + '0' * a '1' * (w-a) '1' w-a w a '0' * a '0' a ans.append(l) ans.append ans append l for i in range(h):
    print(''.join(ans[i])) i range(h) range h print(''.join(ans[i])) print ''.join(ans[i]) ''.join '' join ans[i] ans i a,b = map(int,input().split()) map(int,input().split()) a h,w,a,b = map(int,input().split()) map(int,input().split()) h b = map(int,input().split()) map(int,input().split()) b ans = [] [] ans l = '0' * (w-a) + '1' * a '0' * (w-a) + '1' * a l w,a,b = map(int,input().split()) map(int,input().split()) w l = '1' * (w-a) + '0' * a '1' * (w-a) + '0' * a l
h,w,a,b = map(int,input().split())
ans = []
for _ in range(h-b):
    l = '0' * (w-a) + '1' * a
    ans.append(l)
for _ in range(b):
    l = '1' * (w-a) + '0' * a
    ans.append(l)
for i in range(h):
    print(''.join(ans[i]))