How to solve a feedback system (recursive definitions)?

I have given a feedback system in z domain like:

y = 2*w2 + e
w2 = z^-1/(1-z^-1) * (w1 + (1-z^-1)*w2 - 1/2*(1-z^-1)*y)
w1 = v - y + z^-1/(1-z^-1) * 1/2 * (v - y)

where y is the system output, v is the system input, w1 and w2 are intermediate nodes and e is an error input. I want to generate the output expression:

y = e*f(z) + z*g(z)

i.e., the system output as a sum of the error input and the signal input. Alternatively: signal transfer function and error transfer function.

Just defining the terms as above and using Solve[], Reduce etc. did not work out.
Does anyone have a hint?
Thanks!

Solved. Used Solve[] with a list…