So far as I remember there are two trains - a Glasgow / Edinburgh (splits / joins at Carstairs) and an Aberdeen / Inverness / Fort William (splits/ joins at ?Edinburgh?)
There are indeed two trains - I have a feeling the Edinburgh/Glasgow one now splits/joins at Edinburgh, but I've only ever been on that one once.
The Inverness/Aberdeen/FWilliam leaves Euston as 16 coaches. Configuration, from the front, is 6 sleeper cars, lounge car, seated car, 6 sleeper cars (P,N,M,L,K,J) , lounge car, seated car (H). The rear 8 are for Inverness, I'm not sure how the front 8 are lettered, nor how they divide up between Aberdeen and FWilliam.
At Edinburgh, the train enters Platform 11/10 from the west. Class 67 goes on the back and what were the rear 8 coaches go off to Inverness, with coach H now leading. What happens then, I am not sure! I know they have to shunt in a seated coach (and possibly another lounge car?) along with the FWilliam section. Class 67 to Aberdeen and class 37 to FWilliam.
On the way south, the Inverness section starts with coach P leading. Quite how they organise the shunting at Edinburgh I'm not sure: the Inverness section usually ends up at the back of the combined train (with coach P now at the very back), but it depends a bit on who gets to Edinburgh first! I remember being right at the front once at Euston - which I guess means we must have been last into Edinburgh - but normally it's a long walk!