H. Happy Face
time limit per test
3.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

One day our good friend Arthur Fleck went to Wayne's family mansion, determined to confirm the suspicions he had regarding his father's identity.

In the meantime, he found the little Bruce Wayne, who wasn't smiling. Of course, the comedian and friend of all the children wasn't happy about that. So he decided to play a game with him expecting to put on a happy face in Bruce.

The game consists of picking up balloons! To prevent someone to grab all the balloons in their first turn making the game boring, the rules are that you can only grab $$$A$$$, $$$B$$$ or $$$C$$$ balloons of one of the $$$K$$$ bundles of balloons each turn, and the first person who can not do this loses the game.

However Bruce is a very intelligent and very competitive boy, he will be mad if Arthur loses on purpose, so all the movements Arthur can make needs to be perfect to not upset Bruce, but Arthur will be sad if Bruce losses the game. Bruce will only be happy if he wins after Arthur and Bruce play an optimal game.

Input

A line denoting who of the players have the first turn, is either "Bruce" or "Arthur". The second line has 4 integers $$$A$$$, $$$B$$$, $$$C$$$, (1 ≤ $$$A$$$, $$$B$$$, $$$C$$$ ≤ 100) and $$$Q$$$ (1 ≤ $$$Q$$$ ≤ 1e5) describing the valid moves and the number of queries.

Then $$$Q$$$ queries follow, each query is described by two lines, the first contains an integer $$$K$$$ (1 ≤ $$$K$$$ ≤ 1e3) representing the number of bundles of ballons in the query, the second line contains $$$K$$$ integer numbers separated by a space, where the $$$i$$$-th number in the line represents the amount of balloons on the $$$i$$$-th bundle $$$K_i$$$ (1 ≤ $$$K_i$$$ ≤ 1e6).

Output

Print $$$Q$$$ lines, where the $$$i$$$-th contains the string "Happy Bruce" if Bruce wins the game on the $$$i$$$-th query, print the string "Sad Arthur" otherwise.

Examples
Input
Bruce
7 1 3 2
1
9
1
6
Output
Happy Bruce
Sad Arthur
Input
Arthur
4 3 8 1
2
903 69
Output
Sad Arthur
Note

Solving problems is fun and I'm tired of pretending that it's not.