(0) Obligation:

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

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

Q is empty.