sagheer work kindergarten there n child m different toy these child use welldefine protocol play toy each child lovely set toy love play he request toy distinct moment time a child start play grant toy lovely set if child start play soon later give toy no child keep toy forever child request toy distinct moment time no child request toy time if child grant toy give finish play lovely set if child grant toy wait grant toy he can not request toy wait if child wait toy child request toy firstChildren do not like play that s share toy when child request toy grant toy child depend toy free if toy free Sagheer child Otherwise child wait can not request toychildren smart detect wait forever toy want in case start cry in word cry set set child child wait toy keep child setnow reach scenario child request lovely set child x request lovely set some child play waiting toy child cry finish play if child x currently wait toy make request get toy otherwise make request right away when child x request child start cryingYou give scenario q independent query each query form x y mean request child x toy y your task help sagheer find size maximal crying set child x make request