Help me in solving LB02 problem

My issue

Not able to solve the problem
Help me out to solve this…

My code

t = int(input())

for _ in range(t):
    x, y, z = map(int, input().split())

    if z % x == 0 and z % y == 0:
        print("NONE")
    elif z % x == 0 or z % y == 0:
        print("ANY")
    elif z % x != 0 and z % y != 0:
        print("CHICKEN")

Learning course: Python with Data structures
Problem Link: Practice Problem in - CodeChef

t = int(input())
for i in range(t):
x, y, z = map(int, input().split())

if z % x != 0 and z % y != 0:
    print("NONE")
elif z % x == 0 and z % y == 0:
    print("ANY")
elif z % x == 0 and z % y != 0:
    print("CHICKEN")
else:
    print("DUCK")

Try this