After a large gunfight, a trial was held to determine the order in which the shots were fired. Fortunately no one who took part was killed, but everyone's account of the firing order disagreed, and reconstructing that order is crucial to deciding guilt or innocence.
Each person's exact position is known. Every person fired at most one shot, and sound travels through the air at 340 meters per second. If a person $P$ fires at time $t_P$, the sound of that shot reaches a person at position $Q$ at time $t_P + \frac{d(P, Q)}{340}$, where $d(P, Q)$ is the distance in meters between the two.
Each statement has the form "S1 heard S2 firing before S3", meaning that at S1's position the sound of S2's shot was heard before the sound of S3's shot, i.e. $t_{S2} + \frac{d(S1, S2)}{340} < t_{S3} + \frac{d(S1, S3)}{340}$.
Write a program that, if firing times satisfying all statements exist and the order of the people who fired is then uniquely determined, finds that order.
The first line contains the number of test cases $T$ ($1 \le T \le 100$).
The first line of each test case contains the number of people $n$ ($2 \le n \le 100$) and the number of statements $m$ ($1 \le m \le 1000$).
Each of the next $n$ lines contains a person's name $S$ and position coordinates $x$ and $y$. A name is at most 20 characters long and consists only of uppercase and lowercase letters. Coordinates are in meters, and no two people share the same position.
Each of the next $m$ lines contains one statement in the form "S1 heard S2 firing before S3". S1, S2, and S3 are names, and $S2 \ne S3$.
If a person is never mentioned as S2 or S3 in any statement, that person is assumed not to have fired.
The test data is constructed so that a distance error smaller than $10^{-7}$ does not change the answer.
For each test case, print the answer on its own line. If the firing order of the people who fired is uniquely determined, print their names in firing order separated by single spaces. If more than one order is possible, print "UNKNOWN". If no order satisfies all statements simultaneously, print "IMPOSSIBLE".