Infiltration

No attempts yetTime limit1sMemory limit128 MB

Problem

You are a spy who has infiltrated the crew of a legendary pirate captain, secretly carrying short encrypted messages between the captain and his shipmates. Your task is to break the cipher and recover the plain text.

The messages use a simple substitution cipher: a fixed, one-to-one mapping replaces every plain-text letter with a distinct cipher letter. Only the 26 lowercase letters are involved, and spaces are never encrypted. Different plain-text letters are always replaced by different cipher letters, and the replacement is not symmetric (if 'a' is encrypted as 'h', that does NOT mean 'h' is encrypted as 'a').

You know that pirate messages tend to use the following twelve common words:

be     our    rum    will
dead   hook   ship   blood
sable  avenge parrot captain

Given one encrypted line, recover the plain text. This is possible if and only if there is a UNIQUE decryption (a one-to-one mapping from cipher letters back to plain-text letters) such that:

  1. some subset $S$ of the twelve known words all appear as whole words in the decrypted text, and
  2. the number of distinct letters used by the words in $S$ equals the number of distinct letters in the encrypted text.

Condition 2 forces the known words that appear to together use every distinct cipher letter, so the mapping is fully determined. Not all known words need appear, and the decrypted text may contain other, unknown words. If exactly one such mapping exists, print the decrypted text; otherwise the text cannot be uniquely decoded.

Input

A single line containing the encrypted text: at most 200 characters, each character either a lowercase letter ('a'-'z') or a space. Only the letters are encrypted; the spaces are left unchanged and separate the words.

Output

If the text can be uniquely decrypted under the rule above, print the decrypted plain text. Otherwise print Impossible.