(0) Obligation:

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

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

Q is empty.