한 명은 한 번씩, 다른 한 명은 두 번씩 번갈아 글자를 지우거나 다음 알파벳으로 바꿀 때 Petro가 이기는지 판정한다.
어려움8게임 이론수학그리디문자열아직 제출이 없습니다시간 제한1초메모리 제한512 MBPetro decided to play new game with Oleg-Andriy. They have a string that consists of lowercase English letters and they alternatively make turns: one can choose an arbitrary letter and delete it, or replace with the next letter in the alphabetical order (if it exists). In this strange game a player who can’t move loses.
Petro was almost sure in his victory, but suddenly realized, that this game is unequal, because Oleg-Andriy always will make moves two times in a row (first for Oleg, then for Andriy). So, he is interested whether he can win this game.
You are given the initial string and the information about the player who starts. Your task is to determine whether Petro can win game if his opponent will play optimally.
The first line contains a positive integer n (1 ≤ n ≤ 105) — the number of characters in the string, followed by the name of the player which goes first (“Petro” or “Oleg-Andriy”). In the second line you are given the game string itself.
All characters in the given string are lowercase English letters.
Print one word — “Win” in case of Petro’s win, or “Lose” otherwise.