Five lemma

Let $$A_1 \to A_2 \to A_3 \to A_4 \to A_5$$ and $$B_1\to B_2 \to B_2 \to B_4 \to B_5$$ be exact sequences of homomorphisms. Suppose there are maps $$f_i:A_i \to B_i$$ such that the diagram of all these maps commutes. Then the following are true:


 * If $$f_2$$ and $$f_4$$ are injective and $$f_1$$ is surjective, then $$f_3$$ is injective
 * If $$f_2$$ and $$f_4$$ are surjective and $$f_5$$ is injective then $$f_3$$ is surjective
 * if $$f_1,f_2,f_4,f_5$$ are isomorphisms, then $$f_3$$ is also an isomorphism