#d1505. namonamo

namonamo

namonamo

Problem Description

Two little girls sitting at a desk love both kissing and sharing a single pair of earphones to listen to songs together.

One day, while listening to their favourite song, they noticed that the lyrics of a song can be viewed as a string containing only lowercase letters, and the length of the string is guaranteed to be even.

Unfortunately, their earpods were bought from Pinduoduo for 9.9 yuan with free shipping, and developed a magical glitch: for each letter, exactly one of the two girls hears it.

After a song finished playing, while complaining about the earphone quality, they were surprised to find that the strings formed by the letters each of them heard were exactly the same.

Given the lyrics of a song, determine whether this could possibly happen.


Formal statement: given a string of even length consisting only of lowercase letters, determine whether it can be partitioned into two completely identical subsequences.

Input Format

The first line contains a positive integer TT, the number of test cases.

Each of the following TT lines contains a string SS, the lyrics.

Output Format

Output TT lines, each containing the string possible or impossible, indicating the answer for that test case.

Sample Input

5
aabb
abba
namonamo
arqmpfvvbtltlhufznkldkurrazmgebfxeamrewn
aacfcfqqsmksimkoioeertbrtbhphnpnggddjjll

Sample Output

possible
impossible
possible
impossible
possible

Sample Explanation

For the first sample, one possible glitch configuration is:

  • The first girl hears a
  • The second girl hears a
  • The first girl hears b
  • The second girl hears b

For the third sample, one possible glitch configuration is:

  • The first girl hears the first 44 letters
  • The second girl hears the last 44 letters

Constraints

For 100%100\% of the data, T=21,∣S∣≤40T=21, |S|\le 40.