Preferred Digits
Alice has a preference for numbers that are both even and divisible by 7. Bob, on the other hand, is drawn to numbers that are odd and divisible by 9. When Alice, Bob, and Charlie come across a number , they decide who gets to keep the number based on their preferences:
- If the number aligns with Alice's preference, she takes the number.
- If it matches Bob's liking, he claims the number.
- Should neither Alice nor Bob favor the number, Charlie ends up with it.
Determine who among Alice, Bob, or Charlie will take the number home.
Important: It's guaranteed that no integer will be simultaneously favored by both Alice and Bob.
Input Structure
- The initial line includes a single integer , representing the count of test cases.
- Following this, each test case is represented by a line containing a single integer .
Output Structure
For every test case, indicate on a separate line whether "Alice", "Bob", or "Charlie" takes the number home. The case of the letters is irrelevant, meaning Alice
, ALICE
, aLiCe
, etc., are all deemed equivalent.
Constraints
Sample Scenarios (with explanations)
Scenario #1:
Input:
8 7 14 21 18 27 63 126 8
Output:
Charlie Alice Charlie Charlie Bob Bob Alice Charlie
Explanation
Scenario 1: The number 7 does not appeal to Alice as it isn't even, nor does it attract Bob since it isn’t a multiple of 9. Hence, Charlie takes it.
Scenario 2: Number 14 is both even and divisible by 7, making it Alice's choice.
Scenario 3: Since 21 is neither even nor a multiple of 9, it doesn't catch the interest of either Alice or Bob, leaving Charlie to take it.
Scenario 4: Number 18 is even but not divisible by 7, and not odd, thus not meeting Bob's criteria either. Charlie takes this number.
Scenario 5: Number 27, being odd and divisible by 9, goes to Bob.
Scenario 6: Similarly, 63 is taken by Bob for being odd and a multiple of 9.
Scenario 7: The number 126 is favored by Alice for being both even and divisible by 7.
Scenario 8: Lastly, number 8 is even but not a multiple of 7, and not odd, making it unattractive to both Alice and Bob. Charlie takes this number home.