Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

C24E08CE - EC08C Pandas Playing (E)

Do you know the game where you whisper a sentence into someone's ear, they whisper the sentence into someone else’s ear as best they understood it and so on, until everyone has heard (some version of) the sentence and it is finally whispered back into your ear and you can laugh at how much distortion it has suffered? Well guess what! A group of young cuddly pandas have just met each other, and they want to play this game! However some pandas are still shy and they will only whisper into the ears of those, whom they like. Of course a smile can do wonders (especially that of a panda) and so all attractions are returned in kind - if a panda likes another, they are always liked back!

They are now in the process of deciding if this game is at all possible for them. Currently they just assume that they can talk, and investigate more pressing concerns. They have already counted the total number of players and there are N of them. Some of them with a background in social networks have noticed that the lowest number of whispers from Sally to Sue (two pandas) is ceil(N/2). That is following the constraint that only friends can whisper to each other, to send a sentence from Sally to Sue takes at least ceil(N/2) whispers (if they were friends, it would take only 1).

Right now they are trying to decide whether they are able to play the game. This is where you come in (saviour of all games panda) and help them decide! Of course, the game is only fun if everybody participates, and the sentence never gets back more than once to anyone's ear.

Input

The first line contains T, the number of test cases in the file. This is followed by the test cases. The first line of a test case contains N. The following N lines each start with |Li|, the number of pandas panda number i (numbered from 1 to N) likes, and contains Li,1, Li,2, Li,3, ... , the numbers of the first, second, third, etc., pandas (numbered from 1 to N as well) that panda number i likes, separated by spaces.

Output

For every test case output POSSIBLE or IMPOSSIBLE on a separate line. 6

This is the electronic variant of the problem. Read more here about submitting solutions!

Example

Input
2
4
2 2 4
2 1 3
2 2 4
2 3 1
3
1 2
2 1 3
1 2
Output
POSSIBLE
IMPOSSIBLE

Added by:Jacek DÄ…browski
Date:2009-01-29
Time limit:0.200s-2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ADA95 ASM32 BASH BF C CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON RUBY SCM guile SCM qobi ST TEXT WHITESPACE
Resource:Challenge 24 2008 Electronic Contest

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.