from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

h, w, a, b = MAP()

for i in range(h+1):
    for j in range(w+1):
        if a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j):
            aa = i
            bb = j
            break
    else:
        continue
    break

s = [[0]*w for i in range(h)]
sum = [0]*w

for i in range(h):
    tmp = 0
    for j in range(w):
        if ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ):
            if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1

for i in range(h):
    print(*s[i][:], sep="") from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement from collections import deque,defaultdict,Counter from bisect import bisect_left,bisect_right from operator import itemgetter from heapq import heapify,heappop,heappush from queue import Queue,LifoQueue,PriorityQueue from copy import deepcopy from time import time import string string import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST h, w, a, b = MAP() h MAP() MAP w a b for i in range(h+1):
    for j in range(w+1):
        if a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j):
            aa = i
            bb = j
            break
    else:
        continue
    break i range(h+1) range h+1 h 1 for j in range(w+1):
        if a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j):
            aa = i
            bb = j
            break
    else:
        continue
     j range(w+1) range w+1 w 1 if a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j):
            aa = i
            bb = j
            break
     a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j) a*i + (w-a)*(h-i) a*i a i (w-a)*(h-i) w-a w a h-i h i b*j + (h-b)*(w-j) b*j b j (h-b)*(w-j) h-b h b w-j w j aa = i aa i bb = j bb j break continue break [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w s = [[0]*w for i in range(h)] s [[0]*w for i in range(h)] sum = [0]*w sum [0]*w [0] 0 w for i in range(h):
    tmp = 0
    for j in range(w):
        if ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ):
            if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1 i range(h) range h tmp = 0 tmp 0 for j in range(w):
        if ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ):
            if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1 j range(w) range w if ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ):
            if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1 ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ) i < aa and tmp < a i < aa i aa tmp < a tmp a i >= aa and tmp < w-a i >= aa i aa tmp < w-a tmp w-a w a if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1 ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ) j < bb and sum[j] < b j < bb j bb sum[j] < b sum[j] sum j b j >= bb and sum[j] < h-b j >= bb j bb sum[j] < h-b sum[j] sum j h-b h b s[i][j] = 1 s[i][j] [i] s i j 1 tmp += 1 tmp 1 sum[j] += 1 sum[j] sum j 1 for i in range(h):
    print(*s[i][:], sep="") i range(h) range h print(*s[i][:], sep="") print *s[i][:] s[i][:] [i] s i : sep="" sep "" a, b = MAP() MAP() a def INT()   : return int(input()) def INT()   : return int(input()) INT def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST tmp = 0 0 tmp tmp += 1 1 tmp b = MAP() MAP() b s = [[0]*w for i in range(h)] [[0]*w for i in range(h)] s w, a, b = MAP() MAP() w def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input bb = j j bb h, w, a, b = MAP() MAP() h def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP aa = i i aa sum = [0]*w [0]*w sum
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

h, w, a, b = MAP()

for i in range(h+1):
    for j in range(w+1):
        if a*i + (w-a)*(h-i) == b*j + (h-b)*(w-j):
            aa = i
            bb = j
            break
    else:
        continue
    break

s = [[0]*w for i in range(h)]
sum = [0]*w

for i in range(h):
    tmp = 0
    for j in range(w):
        if ( i < aa and tmp < a ) or ( i >= aa and tmp < w-a ):
            if ( j < bb and sum[j] < b ) or ( j >= bb and sum[j] < h-b ):
               s[i][j] = 1
               tmp += 1
               sum[j] += 1

for i in range(h):
    print(*s[i][:], sep="")