(0) Obligation:

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

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

Q is empty.