Company: EPAM_15thjuly
Difficulty: medium
Stone Game Problem Description Peter Parker invents a game to play with Aunt May. There are N stones on a board, and a list of allowed moves is given. The players take turns, and Peter moves first. In one move, the current player chooses any value m from the move list that is at most the current number of stones ( m <= stones left ), and removes exactly m stones from the board. A player who cannot make a move on their turn loses. Both players play optimally. Print the name of the winner. Complete the function Solution(N, moves) , which receives the initial number of stones N and the list moves of allowed move values, and returns "Peter" if Peter wins, otherwise "May" . Input Format Read from standard input. N M moves[0] moves[1] ... moves[M-1] Line 1 contains the integer N , the initial number of stones. Line 2 contains the integer M , the number of allowed moves. Each of the next M lines contains one integer, an allowed move value. Output Format Print Peter if Peter wins, otherwise