Stern-Gerlach apparatus, measurement problem? Consider the diagram below:

It is 3 Stern-Gerlach apparatus along with some 'lenses' (illustrated here by lines). 
Question
What would the output at A and B be? 
Additional information
The problem with this is whether the middle part (i.e. the middle Stern-Gerlach apparatus along with the lenses) is performing a measurement. If it is, then we would expect an output at both A and B; if it is not, then an output only at A. My intuition tells me that it is not performing a measurement and therefore we should expect an output only at A.   
Can anyone explain whether this reasoning is correct - how should this situation be analyzed?
 A: $\newcommand{\ket}[1]{\left| #1 \right>}$
Assuming that the lenses are some sort of a beam combiner and the vertical direction is $z$ (for convenience) and the  I did the following:
After the second SG device the upper beam is in the state $\ket {x+}$ and the lower beam is in the $\ket{x-}$. Combining these two with the beam splitter we have the final state
$$\ket \psi = \frac{1}{\sqrt 2} (\ket{x+}+\ket{x-}) = \frac{1}{ 2} \big(  \ket+ + \ket- + \ket + - \ket - \big) = \ket+ $$
where $\ket \pm$ denotes the eigenstate of the $S_z$ operator, which means that after the last measurement you have only particles from the upper "exit" as if you have done no measurement in the middle.
A: We should expect an output in both A and B. This is because (if I understand correctly what your "lenses" do) the first apparatus prepares a pure state spin-y-up, then the second SG produces output in both the positive and negative value for the spin along the x axis (because the two observables do not commute) and the lenses, bringing together the two ensembles produces a mixed state 50% right and 50% left. So if we mesure again the spin along the y axis we'll have output in both A and B (bacause, again, the two observables don't commute with each other).
