X = X + Y

Z = Z - Y

Y = X + Z

X = X - Y

Result X < Y

X = 5, Y = 7, Z = 0

X = 5 + 7 X = 12, Y = 7, Z = 0

Z = 0 - 7 X = 12, Y = 7, Z = -7

Y = 12 + -7 X = 12, Y = 5, Z = -7

X = 12 - 5 X = 7, Y = 5, Z = -7

Result X = Y

X = 2, Y = 2, Z = 0

X = 2 + 2 X = 4, Y = 2, Z = 0

Z = 0 - 2 X = 4, Y = 2, Z = -2

Y = 4 + -2 X = 4, Y = 2, Z = -2

X = 4 - 2 X = 2, Y = 2, Z = -2

Result X > Y

X = 3, Y = 1, Z = 0

X = 3 + 1 X = 4, Y = 1, Z = 0

Z = 0 - 1 X = 4, Y = 1, Z = -1

Y = 4 + -1 X = 4, Y = 3, Z = -1

X = 4 - 3 X = 1, Y = 3, Z = -1

X = Z + Z

Y = X + Y

Z = X + Z

Result

X = 10, Y = 15, Z = 20

X = 20 + 20 X = 40, Y = 15, Z = 20

Y = 40 + 15 X = 40, Y = 55, Z = 20

Z = 40 + 20 X = 40, Y = 55, Z = 60

Z = X / Y

Z = Y + Z

Result X < Y

X = 8, Y = 9, Z = 0

Z = 8 / 9 X = 8, Y = 9, Z = 0

Z = 9 + 0 X = 8, Y = 9, Z = 9

Result X > Y

X = 9, Y = 8, Z = 0

Z = 9 / 8 X = 9, Y = 8, Z = 1

Z = 8 + 1 X = 9, Y = 8, Z = 9

Y = Y - Z

Y = Y + Y

X = X - Z

Z = X + Y

Result X < Y < Z

X = 1, Y = 2, Z = 3 (1 + 2*2 - 3*3 = -4)

Y = 2 - 3 X = 1, Y = -1, Z = 3

Y = -1 + -1 X = 1, Y = -2, Z = 3

X = 1 - 3 X = -2, Y = -2, Z = 3

Z = -2 + -2 X = -2, Y = -2, Z = -4

Result X < Z < Y

X = 1, Y = 3, Z = 2 (1 + 2*3 - 3*2 = 1)

Y = 3 - 2 X = 1, Y = 1, Z = 3

Y = 1 + 1 X = 1, Y = 2, Z = 3

X = 1 - 2 X = -1, Y = 2, Z = 3

Z = -1 + 2 X = -1, Y = 2, Z = 1

Result Y < X < Z

X = 2, Y = 1, Z = 3 (2 + 2*1 - 3*3 = -5)

Y = 1 - 3 X = 2, Y = -2, Z = 3

Y = -2 + -2 X = 2, Y = -4, Z = 3

X = 2 - 3 X = -1, Y = -4, Z = 3

Z = -1 + 2 X = -1, Y = -4, Z = -5

Result Y < Z < X

X = 3, Y = 1, Z = 2 (3 + 2*1 - 3*2 = -1)

Y = 1 - 2 X = 3, Y = -1, Z = 2

Y = -1 + -1 X = 3, Y = -2, Z = 2

X = 3 - 2 X = 1, Y = -2, Z = 2

Z = 1 + -2 X = 1, Y = -2, Z = -1

Result Z < X < Y

X = 2, Y = 3, Z = 1 (2 + 2*3 - 3*1 = 5)

Y = 3 - 1 X = 2, Y = 2, Z = 1

Y = 2 + 2 X = 2, Y = 4, Z = 1

X = 2 - 1 X = 1, Y = 4, Z = 1

Z = 1 + 4 X = 1, Y = 4, Z = 5

Result Z < Y < X

X = 3, Y = 2, Z = 1 (3 + 2*2 - 3*1 = 4)

Y = 2 - 1 X = 3, Y = 1, Z = 1

Y = 1 + 1 X = 3, Y = 2, Z = 1

X = 3 - 1 X = 2, Y = 2, Z = 1

Z = 2 + 2 X = 2, Y = 2, Z = 4

Result X = Y = Z

X = 1, Y = 1, Z = 1 (1 + 2*1 - 3*1 = 0)

Y = 1 - 1 X = 1, Y = 0, Z = 1

Y = 0 + 0 X = 1, Y = 0, Z = 1

X = 1 - 1 X = 0, Y = 0, Z = 1

Z = 0 + 0 X = 0, Y = 0, Z = 0

I'm too lazy to write out the other cases. It works.