We have a long piece of wood whose length is \(L\).
There are \(Q\) queries each consisting of a character and an integer \((c_i, x_i)\):
It's guranteed that it wouldn't be cut at postion \(x_i\) when you're asked to print out the length.
There are two integers \(L, Q\) in the first line respectively.
The following \(Q\) lines contain a character and an integer \(c_i, x_i\).
For queries where \(c_i=\)'b', print out the length of piece to which postion \(x_i\) belong. Remember to put a new line character at the end of each such query.