(0) Obligation:

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

h(x, y) → f(x, y, x)
f(0, 1, x) → h(x, x)
g(x, y) → x
g(x, y) → y

Q is empty.