Spell Caster Harry Potter
Spell Caster
Harry is getting ready to fight the dark lord Voldemort. To win, Harry has to successfully cast a
Spell which is a combination of (zero or more) spells he was taught at [Link] he casts
anything else not in the spell book, Voldemort will win in the fight against Harry potter.
Can you help Harry figure out if the spell he casts can make him win against Voldemort?
Input:
Each Input contains 3 lines
Line 1: Number of spells in the spell book.
Line 2: The spell book itself - each spell is space separated.
Line 3: The spell Harry casts (No space separation).
All spells will be in lowercase letters.
Harry can repeat spells.
Output:
Winner of the contest. If Harry casts a combination of Spell taught at Hogwarts, the winner is
Harry, otherwise, the winner is Voldemort.
======================================================================
Example 1:
Input:
3
alohomora lumos accio
lumosaccio
Output:
Harry
======================================================================
Example 2:
Input:
3
expelliarmus expectopatronum accio
accioeexpelliarmus
Output:
Voldemort
======================================================================
Spell Caster Harry Potter
Example 3:
Input:
2
lumos oscuro
lumoscuro
Output:
Voldemort