In C, a string is not a native data type. A string is just an array of characters with a NULL at the end to mark where it stops. Programs still work with strings all the time, so the C standard library ships a set of functions for them: strcpy, strcmp, strtol, strtok, strlen, strcat.
There is one more function that few people know and almost nobody uses: strfry. It shuffles the characters of the input string into a random order and returns the result. The shuffled result may be equal to the original string.
Given two strings, decide whether the second one can come out of applying strfry to the first one.
The first line holds the number of test cases N. (0<N<1001)
Each test case is one line with two strings of lowercase English letters, separated by a single space. Each string has length between 1 and 1000.
For each test case print one line: Possible if the second string can come out of applying strfry to the first string, and Impossible otherwise. Do not print the quotes.