h,w,a,b=map(int,input().split())
a-=1
b-=1
ans=[[0 for i in range(w)] for j in range(h)]
for i in range(h):
  for j in range(w):
    if (i>b and j>a) or (i<=b and j<=a):
      ans[i][j]=1
for x in ans:
  print(*x,sep="") h,w,a,b=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b a-=1 a 1 b-=1 b 1 [0 for i in range(w)] for j in range(h) for j in range(h) j range(h) range h for j in range(h) [0 for i in range(w)] ans=[[0 for i in range(w)] for j in range(h)] ans [[0 for i in range(w)] for j in range(h)] for i in range(h):
  for j in range(w):
    if (i>b and j>a) or (i<=b and j<=a):
      ans[i][j]=1 i range(h) range h for j in range(w):
    if (i>b and j>a) or (i<=b and j<=a):
      ans[i][j]=1 j range(w) range w if (i>b and j>a) or (i<=b and j<=a):
      ans[i][j]=1 (i>b and j>a) or (i<=b and j<=a) i>b and j>a i>b i b j>a j a i<=b and j<=a i<=b i b j<=a j a ans[i][j]=1 ans[i][j] [i] ans i j 1 for x in ans:
  print(*x,sep="") x ans print(*x,sep="") print *x x sep="" sep "" a,b=map(int,input().split()) map(int,input().split()) a b-=1 1 b ans=[[0 for i in range(w)] for j in range(h)] [[0 for i in range(w)] for j in range(h)] ans b=map(int,input().split()) map(int,input().split()) b a-=1 1 a h,w,a,b=map(int,input().split()) map(int,input().split()) h w,a,b=map(int,input().split()) map(int,input().split()) w
h,w,a,b=map(int,input().split())
a-=1
b-=1
ans=[[0 for i in range(w)] for j in range(h)]
for i in range(h):
  for j in range(w):
    if (i>b and j>a) or (i<=b and j<=a):
      ans[i][j]=1
for x in ans:
  print(*x,sep="")