Game of Chocolates
Submissions: 1363   Accuracy:

13.9%

  Difficulty: Medium   Marks: 4

Bunty and Dolly are playing a game, described as follows.

There are two boxes full of chocolates. Both can eat 'L' (L>=1) chocolates from any one box or 'L' chocolates from both the box in each step. They play the game alternatively and the last one to eat the chocolate will be the winner.

As Bunty wants to impress Dolly, he wants to make Dolly the winner. You have to help Bunty in deciding who should play first.

Assume that both the players play the game optimally.

Input:

The first line contains 'T' denoting the number of testcases. Then follows description of testcases. The next T lines contains the two space separated integers a and b denoting the number of chocolates in two boxes respectively.

Output:

For each testcase , Output "Bunty" if Bunty should play first else print "Dolly".

Constraints:

1<=T<=100
0<=a<=10^6
0<=b<=10^6

Example:

Input:
3
1 2
1 3
2 0

Output :
Bunty
Dolly
Dolly

Explanation:
In the first testcase, if Bunty starts first, all the next possible state (0,2), (1,1), (0,1) are wining state for Dolly.

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: dipjal1996


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.