X should be based on Q, Z based on R and Y calculated from X and Z.