Professor Sh. is quite old, he has a grandson named Vlad, who studies at the Golovda State University. To prevent exhaustion from studying, sometimes one needs to take a break from it. Vlad does not waste time on stupid computer games, spending all his free time playing "Sea Battle" against his grandfather.
The idea of the game is the following: there is a grid of $$$10 \times 10$$$, on which $$$10$$$ ships are placed: $$$4$$$ single-deckers, $$$3$$$ double-deckers, $$$2$$$ three-deckers and $$$1$$$ four-decker, ships on the grid can only be placed horizontally or vertically. Vlad is a virtuoso of this game, so he never loses. We are only interested in the events that take place on the grid of Professor Sh. During the game, Vlad can query the following commands:
The first $$$10$$$ input lines contain $$$10$$$ elements describing the opponent's grid before the start of the game: if the $$$j$$$ -th element of the $$$i$$$ -th line is equal to "#", this means that the square with coordinates $$$(i, j)$$$ contains a fragment of a ship, the symbol "*" means that there is "sea" in this square.
The $$$11$$$ input line contains the number $$$q$$$ ($$$1 \le q \le 100$$$) – the number of commands that Vlad requested. It is guaranteed that the ships are placed correctly on the grid, they do not intersect each other.
The following $$$q$$$ strings contain commands of the $$$2$$$ types that Vlad requested.
For each query "SHOW" print $$$3$$$ numbers in a separate line in the following order: the number of undamaged, hit, and sunk ships on Professor Sh's grid.
*******#** *####****# *********# ****#*#*** ******#*** *##******* ********#* *#******#* *****#**#* ###******* 5 SHOW SHOT 1 8 SHOW SHOT 9 9 SHOW
10 0 0 9 0 1 8 1 1