import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

def main(): 
    h,w,a,b = map(int,input().split())
    grid = [['0']*w for _ in range(h)]

    if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
    for i in range(h):
        print(''.join(grid[i]))  
    
if __name__=='__main__':
    main() import sys sys INF = 10 ** 9 INF 10 ** 9 10 9 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 from collections import deque sys.setrecursionlimit(100000000) sys.setrecursionlimit sys setrecursionlimit 100000000 def main(): 
    h,w,a,b = map(int,input().split())
    grid = [['0']*w for _ in range(h)]

    if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
    for i in range(h):
        print(''.join(grid[i]))  
     main h,w,a,b = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b ['0']*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) ['0']*w ['0'] '0' w grid = [['0']*w for _ in range(h)] grid [['0']*w for _ in range(h)] if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
     a == 0 a 0 for i in range(b):
            grid[i] = ['1'] * w

     i range(b) range b grid[i] = ['1'] * w grid[i] grid i ['1'] * w ['1'] '1' w elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
     b == 0 b 0 for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
     i range(h) range h for j in range(a):
                grid[i][j] = '1'
                
     j range(a) range a grid[i][j] = '1' grid[i][j] [i] grid i j '1' for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
         i range(b) range b for j in range(a):
                grid[i][j] = '1'
             j range(a) range a grid[i][j] = '1' grid[i][j] [i] grid i j '1' for j in range(2*a,w):
                grid[i][j] = '1'
        
         j range(2*a,w) range 2*a 2 a w grid[i][j] = '1' grid[i][j] [i] grid i j '1' for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
         i range(b,2*b) range b 2*b 2 b for j in range(a,2*a):
                grid[i][j] = '1'
        
         j range(a,2*a) range a 2*a 2 a grid[i][j] = '1' grid[i][j] [i] grid i j '1' for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
     i range(2*b,h) range 2*b 2 b h for j in range(a):
                grid[i][j] = '1'
    
     j range(a) range a grid[i][j] = '1' grid[i][j] [i] grid i j '1' for i in range(h):
        print(''.join(grid[i]))  
     i range(h) range h print(''.join(grid[i])) print ''.join(grid[i]) ''.join '' join grid[i] grid i if __name__=='__main__':
    main() __name__=='__main__' __name__ '__main__' main() main MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def main(): 
    h,w,a,b = map(int,input().split())
    grid = [['0']*w for _ in range(h)]

    if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
    for i in range(h):
        print(''.join(grid[i]))  
     def main(): 
    h,w,a,b = map(int,input().split())
    grid = [['0']*w for _ in range(h)]

    if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
    for i in range(h):
        print(''.join(grid[i]))  
     main INF = 10 ** 9 10 ** 9 INF
import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

def main(): 
    h,w,a,b = map(int,input().split())
    grid = [['0']*w for _ in range(h)]

    if a == 0:
        for i in range(b):
            grid[i] = ['1'] * w

    elif b == 0:
        for i in range(h):
            for j in range(a):
                grid[i][j] = '1'
                
    else:
        for i in range(b):
            for j in range(a):
                grid[i][j] = '1'
            for j in range(2*a,w):
                grid[i][j] = '1'
        
        for i in range(b,2*b):
            for j in range(a,2*a):
                grid[i][j] = '1'
        
        for i in range(2*b,h):
            for j in range(a):
                grid[i][j] = '1'
    
    for i in range(h):
        print(''.join(grid[i]))  
    
if __name__=='__main__':
    main()
