The Category Remap
Kestrel Insurance is retiring a legacy policy system whose status column holds single letters: A for an active policy, I for an inactive one and P for a pending one. The replacement system stores the words active, inactive and pending instead. Over twenty years the old column has also collected other letters — typos, codes from a system that was merged in, letters nobody can now explain — and every one of those has to arrive as unknown rather than stopping the migration.
Task: Print the new label for each legacy code.
Input
The first line holds one integer n, how many codes follow. Each of the next n lines holds one code exactly as the legacy system stored it. A code may be one of the three known letters or something else entirely.
Output
n lines in the same order, each holding one of active, inactive, pending or unknown.
Example:
Input:
4
A
P
X
I
Output:
active
pending
unknown
inactive
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in