Solve the following system of equations for all three variables.
5x−2y+z = 8
−9x+2y+2z = 5
−9x−2y−5z = 4
5x−2y+z = 8
−9x+2y+2z = 5
−9x−2y−5z = 4