def catAndMouse(x, y, z):
    if(abs(z-x)>abs(z-y)):
        return "Cat B"
    elif (abs(z-x)<abs(z-y)):
        return "Cat A"
    else:
        return "Mouse C"
print(catAndMouse(1,2,3))
print(catAndMouse(1,3,2))
