let [|H;W;A;B|] = stdin.ReadLine().Split() |> Array.map int
let rec f h w (s:string) =
    if h=H then stdout.WriteLine s
    elif w=W then f (h+1) 0 (s+"\n")
    elif (h<H-B && w<W-A) || (h>H-B-1 && w>W-A-1) then f h (w+1) (s+"1")
    elif (h<H-B && w>W-A-1) || (h>H-B-1 && w<W-A) then f h (w+1) (s+"0")
f 0 0 ""