题目描述
Problem Description
Ant and Bug are playing a game of taking stones. The rules of the game are as follows:
- Initially, there are $ N $ stones in a bag.
- Ant, Bug, Ant... take turns to remove stones from the bag.
- Ant removes exactly $ A $ stones at a time. If there are fewer than $ A $ stones in the bag, Ant takes all the stones.
- Bug removes exactly $ B $ stones at a time. If there are fewer than $ B $ stones in the bag, Bug takes all the stones.
- The player who empties the bag on their turn wins the game.
Ant wants to calculate who will win this game.
Input Format
The input is given from the standard input in the following format:
$ N $ $ A $ $ B $
- The first line contains the integer $N\ (1\ ≦\ N\ ≦\ 1000)$ representing the initial number of stones in the bag, the integer $A\ (1\ ≦\ A\ ≦\ 1000)$ representing the number of stones Ant removes at a time, and the integer $B\ (1\ ≦\ B\ ≦\ 1000)$ representing the number of stones Bug removes at a time, all separated by spaces.
Output Format
Output Ant if Ant wins, or Bug if Bug wins, in one line. Make sure to include a newline at the end of the output.
Sample Input and Output
Sample Input #1
5 1 2
Sample Output #1
Bug
Sample Input #2
10 3 4
Sample Output #2
Ant
Notes/Hints
Sample Explanation 1
The game proceeds as follows:
- Ant takes 1 stone. There are 4 stones left.
- Bug takes 2 stones. There are 2 stones left.
- Ant takes 1 stone. There is 1 stone left.
- Since there is only 1 stone left, Bug takes it.
- Bug empties the bag on his turn, so Bug wins.
Sample Explanation 2
The bag will be emptied exactly on Ant's second turn.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
5 1 2
样例输出
Bug