Help me in solving LB02A problem

My issue

can u explain the test case 3 solution of Farm animals

My code

# Step 1: Read and understand the problem statement and sample test cases

# Click on 'Next' once you are ready to proceed.
t = int(input())
for i in range(t):
    X, Y, Z = map(int, input().split())
    if (x == Z and Y == Z):
        print("NONE")
    elif (x = Z and Y == Z):
        print("ANY")
    elif (X == Z and Y == Z):
        print("CHICKEN")

Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

def bird(X, Y, Z):
mincl = X
maxcl = X * 2

mindl = Y 
maxdl = Y * 2 

if Z >= mincl and Z <= maxcl and Z >= mindl and Z <= maxdl:
    return "ANY"
elif Z >= mincl and Z <= maxcl:
    return "CHICKEN"
elif Z >= mindl and Z <= maxdl:
    return "DUCK"
else:
    return "NONE"

X, Y, Z = map(int, input().split())
res = bird(X, Y, Z)
print(result)