Pebble
This summer, Antun and Branka stumbled upon a very interesting beach, which was completely covered with plastic ’pebbles’ brought by the sea from the containers that fell from the cargo ships. They decided to take back with them n of these pebbles, some red and some blue. Now that autumn has arrived, they are playing with the pebbles and reminiscing about the warm summer days.
Their game proceeds as follows: in the beginning, they place the pebbles in a row. Then, Antun and Branka make moves in turn, each time removing one of the pebbles from one of the ends of the row, until someone obtains red pebbles, losing the game. Antun moves first and is wondering whether he could win regardless of the moves Branka makes. Please help him and write a program which will answer his question.
Input
The first line contains two integers and . The second line contains a sequence of characters or , where denotes a red pebble, and denotes a blue pebble. The character appears at least times.
Output
If Antun can win regardless of Branka’s moves, you should print "DA", otherwise print "NE".