5 9
2 1 5 3 4
Top 3
Insert 2 0
Ask 4
Bottom 2
Insert 5 -1
Bottom 2
Query 3
Ask 4
Ask 5