You are a beta tester for a new online game, Jetpack Sniper 3000 Fragfest Extreme. Players wearing jetpacks fly over a metropolitan area and try to shoot one another with laser guns. The only cover is the city's ever-present glass skyscrapers.
To help you play, you have written a program that reports which players you can currently shoot (or be shot by): the players who have an unobstructed straight-line view of your position.
The first line contains a single integer $n$, the number of cities.
Each city is a $10 \times 10$ grid of city blocks. Every block holds one skyscraper whose integer height ranges from $0$ to $9$. A city is given as $10$ lines of $10$ digits; the digit in row $y$ (from the top, $0$-indexed) and column $x$ (from the left, $0$-indexed) is the height of the skyscraper occupying that block.
After the grid comes one line with four coordinate triples. The first is your position; the next three are the positions of players A, B, and C. Each position is written as (x, y, height), where $x$ increases from left to right, $y$ increases from top to bottom, and height is measured upward from the ground. The point $(0, 0, 0)$ is the top-left corner of the grid at ground level.
Notes:
For each city, print the header Fragfest City #X, where X is the city's number ($1$ for the first city, $2$ for the second, and so on). Then print one line for each of players A, B, and C, in that order: print Player Y is in sight if no building blocks your straight-line view of that player, or Player Y is hiding if a building obstructs it (Y is the player's letter).
Assume the following simplifications: