13220 - BBPoints - Deead   

Description

There are  black points on coordinate plane. The -th black point(they're numbered in 1-based) is on  in the beginning.

Then  events happens. There are two types of event:

  1. y-coordinates of the -th point increase by . The -th point must exist on coordinate plane.
  2. a blue point appears on  and it will keep moving right until it reaches . When it touches some black point, that black point will vanish. The blue point will vanish when it touches a black point or stop moving.

In the end, output y-coordinates of all the black points.

Input

The first line contains two integers  and   – the number of black points and the number of events.

Then  lines follow. The -th line contains an integer  – the type of the -th event. If  is equal to 1, then two integers  and  follow(the -th point must exist on coordinate plane). Otherwise three integers  and  follow.

 

It's guaranteed that:

  • The 1st testcase must be identical to the Sample below
  • For the first 5 testcases:  and  y-coordinate of any black point  always holds
  • For the first 7 testcases:  y-coordinate of any black point  always holds

Output

After the  events, output y-coordinates of all the black points and print a newline('\n') character. If some black point doesn't exist, output -1 instead of its y-coordinate.

Sample Input  Download

Sample Output  Download

Tags




Discuss