program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: x,a,b

    read*, x,a,b

    if (abs(x-a) < abs(x-b)) then
        print'(a)', 'A'
    else
        print'(a)', 'B'
    end if
    
end program main