open System

let input1 = stdin.ReadLine().Split(' ')
let input2 = stdin.ReadLine().Split(' ')
//

//------------------------------------------------
let N = input1.[0] |> int
let M = input1.[1] |> int64
let V = input1.[2] |> int
let P = input1.[3] |> int
let A = input2 |> Array.map (fun x -> x |> int64) |> Array.take N


// ２分岐探査によりＯＫの最大インデックスを返す.
let rec searchB ok ng i (a:int64 array) =
    //printfn "ok=%d ng=%d i=%d b=%d, [i]=%d" ok ng i a.[P] a.[i]
    let mid a b = (a+b)/2
    let next o n t =
        let j = mid o n
        //printfn "%s o=%d n=%d j=%d" t o n j
        if (o+1) >= n then o
        else searchB o n j a
    let calc m =
        let r = M*((V-(P-1)-(N-i+1))|>int64)
        let u = [P..(i-1)] |> List.map (fun j -> M-(a.[j]-a.[i])) |> List.sum
        //printfn "m=%d r=%d u=%d" m r u
        if (r <= u) then next i ng "A" else next ok i "B"
    if a.[i] >= a.[P] then next i ng "C"
    else
        let m = a.[i] + M
        if m < a.[P] then next ok i "D" else calc m

let solve =
    let a = Array.concat [ [|-1L|]; (A |> Array.sort |> Array.rev) ]
    let s = searchB 1 (N+1) (N/2) a
    //printfn "s=%d" s
    s

solve |> printfn "%d"