(0) Obligation:

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

f(f(X, Y), Z) → f(X, f(Y, Z))
f(X, f(Y, Z)) → f(Y, Y)

Q is empty.