#K66972. Palindrome Rearrangement

    ID: 32539 Type: Default 1000ms 256MiB

Palindrome Rearrangement

Palindrome Rearrangement

You are given a string S. Your task is to determine whether the characters of S can be rearranged to form a palindrome.

A string can be rearranged into a palindrome if and only if at most one character appears an odd number of times. For example, "civic" and "ivicc" can be rearranged into palindromes, but "hello" cannot.

For each test case, print "Possible" if such a rearrangement exists, otherwise print "Impossible".

Note: Input is read from standard input and output is written to standard output.

inputFormat

The first line contains an integer T, the number of test cases.

Each of the following T lines contains a non-empty string S consisting of lowercase letters.

outputFormat

For each test case, output a line with the result: "Possible" if the string can be rearranged into a palindrome, otherwise "Impossible".

## sample
3
civic
ivicc
hello
Possible

Possible Impossible

</p>