Jonathan Sumabat 6

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Jonathan Sumabat is reciting a Satanic ritual. Jonathan Sumabat believes that if he makes it to the end of his Satanic chant, he will be granted endless wealth, fame and infinite skill in osu! What Jonathan Sumabat doesn't know is that if at any point during the Satanic chant he says any variation of a ๐’ป๐‘œ๐“‡๐’ท๐’พ๐’น๐’น๐‘’๐“ƒ word his soul will be immediately sucked into the endless void. A word is a variation of another if a number can be added or subtracted from each one of the letters in one word to result in the other word. For example cvssjup is a variation of burrito. This is because the word cvssjup is obtained by changing every letter in burrito to the letter in the alphabet with a position that is 1 greater. If the position would go outside the alphabet, it is wrapped back to a. Jonathan Sumabat will still lose his soul if the variation of the ๐’ป๐‘œ๐“‡๐’ท๐’พ๐’น๐’น๐‘’๐“ƒ word is part of a different word. Given the text of the Satanic ritual and the ๐’ป๐‘œ๐“‡๐’ท๐’พ๐’น๐’น๐‘’๐“ƒ word, determine whether or not Jonathan Sumabat will have his soul at the end of it.

Input Specification

The first line of input is the restricted word with f characters f (1 \le f \le 100).
The next line of input is the text of the Satanic ritual. The number of characters in this line is n (f \le n \le 10^6).
The ๐’ป๐‘œ๐“‡๐’ท๐’พ๐’น๐’น๐‘’๐“ƒ word will only contain lowercase letters. The ritual contains lowercase letters and spaces.

Output Specification

If reciting this ritual would result in the loss of Jonathan Sumabat's soul, print YOUR SOUL IS MINE, otherwise print PRANKED.

Sample Input

qipg
lasciate ogne speranza voi ch intrate

Sample Output

YOUR SOUL IS MINE

Explanation for Sample

The sequence ogne in the Satanic ritual is a variation of the ๐’ป๐‘œ๐“‡๐’ท๐’พ๐’น๐’น๐‘’๐“ƒ word qipg as adding 2 to the position of each letter in ogne in the alphabet results in qipg.


Comments

There are no comments at the moment.