from the train
Не выходите из поезда, пока он не остановится.
Do not get off the train until it has stopped.
На границе надо выходить из поезда?
Do I have to get off the train at the border?
Они увидели нас, когда выходили из поезда.
They saw us when they were getting off the train.