X=t Y=t failure
Y=f Z=t solution
Z=f failure
X=f Y=t Z=t failure
Z=f solution
Y=f failure
Hint: the easiest way to solve this problem is to write a program to
generate the tree (using whatever programming language you like).