That is indicated on the platform screens before getting on the train. It tells you which part of the train goes where so you know which wagon to take.
I found it also not very intuitive first time I took it. But hey, when travelling there’s always local peculiarities to take care of ;)