(0) Obligation:

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

g(X) → u(h(X), h(X), X)
u(d, c(Y), X) → k(Y)
h(d) → c(a)
h(d) → c(b)
f(k(a), k(b), X) → f(X, X, X)

Q is empty.