In gym class, you are playing football on an
You know the positions of all the players on the field, but not who has the ball. The person with the ball will always try to score a field goal. It will be blocked if there is a member of the opposite team within
You want to consider every possible scenario. Hence, for each player, assuming they have the ball, will they score or will they be blocked?
Constraints
Subtask 1 [25%]
Subtask 2 [75%]
No additional constraints.
Input Specification
The first line of input contains three integers
The next A
or B
, there is a player on that team at that position. Otherwise, the character will be a .
, which indicates an empty position.
Output Specification
Output an .
indicating an empty position, a Y
meaning the player would score their field goal, or an N
meaning the player would be blocked.
Sample Input
2 5 2
A.B.A
.BB..
Sample Output
N.N.Y
.YY..
Explanation for Sample
In the first row, the player at
In the second row, both players at
Comments
whos also hard stuck on case 45 (TLE)