XadillaX wants a big hole to store some *&@#(*&@!#(*&!)(@&#^& things. So he bought a Hole Breaker.
The ground is an N * N square. The breaker will break a 1 * 1 square hole in the ground per second.
XadillaX is so excited that he can't wait any more. After the breaker worked for several seconds, he will calculate out the maximum hole area.
This problem contains several cases.
The first line of each case contains two integers N and M, indicate the side of ground and the number of operations. (N <= 3 <= 1000, 1 <= M <= 200000).
Then follow M lines.
Each line is a command:
B x y: Break a hole at (x, y). You can assume that every coordinate will at most break for once.
C : Calculate out the maximum area of the holes and output. (Two holes are connected when they share an edge)
For each 'C' command, output the maximum area of the holes.
B 0 0
B 1 0
B 2 2