spoj#MAIN73. Manoj and Pankaj

Manoj and Pankaj

 

Manoj and Pankaj play the following game on a N*M grid, Each cell of which is either empty or contain a stone.
Each player in his his turn must take one the two moves described below:-
1. He can shift an stone to its adjacent right cell, if that cell is empty
2. or he can remove a stone completely from the grid.
Player who take the last turn will wins the game. It is also given that both the players will play optimally and Manoj always take the first turn.
You have to find who will win the game. 

Manoj and Pankaj play the following game on a N*M grid, Each cell of which is either empty or contain a stone.

Each player in his his turn must take one the two moves described below:-

1. He can shift an stone to its adjacent right cell, if that cell is empty

2. He can remove a stone completely from the grid.

1st player who is unable to take a move looses the game . It is also given that both the players will play optimally and Manoj always take the first turn.

You have to find who will win the game. 

Input

First line of each test case contains two integers N and M. (1<=N,M<=200) Each of next N lines contains an string, jth character on of ith string is '*' if there is an stone otherise it is '.' (empty). Input ends when N, M = 0,0. which is not to be processed.

Output

For each test case print 'Manoj' if Manoj wins, print 'Pankaj' otherwise.

Example

Input:

2 2 .* .*

2 2 .* *. 0 0

</p>
Output:
Pankaj
Manoj