(0) Obligation:

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

f(a, empty) → g(a, empty)
f(a, cons(x, k)) → f(cons(x, a), k)
g(empty, d) → d
g(cons(x, k), d) → g(k, cons(x, d))

Q is empty.