Help me in solving FAVOURITENUM problem

My issue

Please explain it clearly

My code

# cook your dish here

Learning course: Basic Math using Python
Problem Link: Favourite Numbers Practice Problem in - CodeChef

@nsanusha123g
refer the following code

# cook your dish here
t=int(input())
for i in range(t):
    a=int(input())
    if(a%2==0 and a%7==0):
        print("Alice")
    elif(a%2==1 and a%9==0):
        print("Bob")
    else:
        print("Charlie")