(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

g(f(x, y), z) → f(x, g(y, z))
g(h(x, y), z) → g(x, f(y, z))
g(x, h(y, z)) → h(g(x, y), z)

Q is empty.