Spy Message#2746

Spy Message

1 second
64 megabytes
Medium

Spies have devised a method to communicate by embedding secret messages within ordinary letters. They have agreed to use the first letters of certain words from a predetermined set to encode their messages, while other words serve as camouflage.

Your task is to write a program that extracts the secret message using the provided set of words and the text of the letter.

Input

The first line contains an integer (10 \leq N \leq 1000), the number of words in the set. Each of the next lines contains a single word, consisting only of lowercase Latin letters, with length at most letters. After these lines, the text of the letter continues until the end of the file. The secret message is made up of the first letters of each word in the letter that begins with any of the specified substrings. The letter uses only Latin letters (case-insensitive) and punctuation marks. Words are separated by spaces, newline characters, and punctuation marks (for example, the text "x-ray" consists of two words: "x" and "ray"). The text contains at most words, each line is no more than characters, and each word is no more than characters long.

Output

Print a single line containing the secret message. All letters in the message should be lowercase.

Examples

Example 1

Loading
Loading