Spring 2016, problem 11

Consider a function $f\colon \mathbf{Q} \to \mathbf{Q}$ which satisfies $$3f(w + x + y + z) + f(w + x) + f(x + y)+ f(y + z) + f(z + w) + f(w + y) + f(x + z)$$ $$= 2f(w + x + y) + 2f(x + y + z) + 2f(y + z + w) + 2f(z + w + x).$$ Find all possible such functions $f(x)$.