Jaehyun has two integer lists a1,…,aN and b1,…,bM. Jeffrey wants to know these numbers, but Jaehyun won't reveal them directly. So Jeffrey asks a series of questions of the form "How big is ai+bj?" Even then Jaehyun refuses to give the exact value; he answers only "It's at least c" (meaning ai+bj≥c) or "It's at most c" (meaning ai+bj≤c). After collecting every answer, Jeffrey still cannot reconstruct any consistent numbers no matter how hard he tries, and starts to suspect that Jaehyun lied on some of the answers. Given Jaehyun's answers, determine whether integer lists consistent with all of them exist, or whether it can be proven that Jaehyun definitely lied.
The input contains multiple test cases. Each test case begins with a line of three positive integers N, M, and Q — the lengths of Jaehyun's two lists and the number of questions Jeffrey asked — satisfying 2≤N+M≤1000 and 1≤Q≤10000. Each of the next Q lines has the form i j <= c or i j >= c: the former means ai+bj≤c and the latter means ai+bj≥c, where −1000≤c≤1000. The input ends with a line 0 0 0, which is not processed.
For each test case, print a single line: Possible if there exist integers a1,…,aN and b1,…,bM consistent with all of Jaehyun's answers, or Impossible if the answers can be proven contradictory (that is, Jaehyun definitely lied).