Proof (Mostowski collapse)
Clearly $T$ is transitive and $π$ is a surjective homomorphism.
Show by induction on $x\in X$ the statement $$ \begin{align*} \forall y\in X \ (π(y) = π(x) \iff y = x). \end{align*} $$ Given the induction hypothesis $$ \begin{align*} \forall u<x \ \forall v\ (π(u) = π(v) \iff u = v), \end{align*} $$ fix $y\in X$ and suppose $π(y) = π(x)$.
Let $z\in X$.
-
If $z<x$, then $π(z) \in π(x) = π(y)$, so there exists $z'<y$ such that $π(z) = π(z')$. Induction hypothesis with $u=z$, $v=z'$ then says $z = z'$, so $z < y$.
-
If $z<y$, then $π(z) \in π(y) = π(x)$, so there exists $z'<x$ such that $π(z) = π(z')$. Induction hypothesis with $u=z'$, $v=z$ then says $z=z'$, so $z<x$.
Therefore $z<x\iff z<y$. By extensionality, $x=y$.