405700: GYM102051 A Nate and Actual 3D Girls

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Nate and Actual 3D Girlstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Nate is tired of 2D girls and has decided that this year he will try looking for the real thing. Although Nate is too shy to go out and talk to one, he realized he could avoid having to go through the ordeal of real-life interaction by writing an anonymous tegami (letter) to his prospective 3D girl. He can do this by cutting up letters from his old Pokémon trading cards.

However, as much as Nate would be happy with any living, breathing 3D girl, he still wants someone with substance. To provide the recipient with a challenge, he decided to encrypt his letter using a simple cipher.

Nate will think of a number $$$k$$$ which is the number of times he will shift the alphabet to the left. For example, if Nate chooses $$$k=3$$$, then the alphabet [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z] is transformed to [d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a, b, c].

This transformed alphabet is what he uses to write the tegami.

Help Nate determine if he was able to obtain enough letters from his $$$n$$$ trading cards to write the tegami if each letter can only be used once.

Input

The first line of input contains three space-separated integers $$$n$$$, $$$m$$$, and $$$k$$$, respectively. The first number, $$$n$$$, is the number of words Nate cut out. The second number, $$$m$$$, is the number of words in the tegami. The third number, $$$k$$$, is the number of times the alphabet is shifted, respectively.

The second line of input contains $$$n$$$ space-separated strings, the words Nate cut out.

The third line of input contains $$$m$$$ space-separated words consisting only of lowercase English letters, the message that Nate wants to encrypt and send to his potential 3D girl.

Constraints

$$$1 \le n \le 100$$$

$$$1 \le m \le 100$$$

$$$0 \le k \le 100$$$

The sum of the lengths of the words Nate cut out will not exceed $$$10^{5}$$$.

The sum of the lengths of the words in the message Nate wants to encrypt will not exceed $$$10^{5}$$$.

Output

Output Make her kokoro go doki-doki! if Nate has enough letters to write the encrypted tegami, and It is gonna be daijoubu. if Nate doesn't have enough letters.

ExamplesInput
4 3 3
chikorita vulpix pidgeot quagsire
date me please
Output
It is gonna be daijoubu.
Input
6 9 22
joltik zapdos kangaskhan pelipper cyndaquil qwilfish
will you go to under the stars with me
Output
Make her kokoro go doki-doki!
Note

In the second example, the alphabet is shifted $$$k = 22$$$ characters to the left as shown below:

Before: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z

After: w, x, y, z, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v

Using this new alphabet, the message is encrypted into sehh ukq ck pk qjzan pda opwno sepd ia.

Nate can write the word sehh using the letter s from the kangaskhan card, a letter e from the pelipper card, the letter h from the qwilfish card, and the letter h from the kangaskhan card.

Notice that different letters may come from the same card, but each letter may only be used once. He could've also used the zapdos card instead of the kangaskhan card for the letter s. If you continue this process you will find that he has enough characters to write the entire tegami.

加入题单

算法标签: