SP12579 SID - Search Insert Delete

Description

You are given a bunch of data (all are positive 32 bit numbers) to operate on. The only operations on the data are search, insert, and delete. When storing the data you have to remember its rank, that is the original position when the data is being inserted. All successful operations must return the ranks of the data. Failed operations should return NONE as the answer. Your objective is to execute all of the operations as fast as possible.

Input Format

The first line of input is N and M, separated by a space, N is the number of initial data. ( 0

Output Format

There is an output for each executed operation. See the above input description about each operation for the detail of the output.