Company: EPAM
Difficulty: medium
Peter Parker invents a game to play with Aunt May. Initially, there are N stones on a board and a list of allowed moves is provided. In one move, a player may choose any number from the move list that is ≤ the current number of stones , and remove that many stones from the board. A player who cannot make a move loses . Peter plays first, and both players play optimally. Print the name of the winner. Input Format The first line contains an integer N , the initial number of stones. The second line contains an integer M , the number of allowed moves. The next M lines each contain one integer, representing a move value. Output Format Print Peter if Peter wins, otherwise May . Constraints 1 ≤ N ≤ 100000 1 ≤ M ≤ 10 1 ≤ move values ≤ 500 Sample Input 1 5 2 1 5 Sample Output 1 Peter Explanation There are 5 stones on the board. The allowed moves are removing 1 or 5 stones. Peter removes 5 stones in the first move, leaving 0 stones on the board. Since May cannot make any mov