(0) Obligation:

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

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

Q is empty.