This joke was in circulation after the tutukurin express train accident in the fifties, and all bahadur sastri, then railway minister resigned accepting moral responsibility.
The engine and eight compartments fell into a flash flooded river killing about 450 people. Last four carriages stood on tracks safely. After services were restored, first eight carriages were empty and everybody crowded into last four. The clever railway staff detached the front carriages and put them at the back which soon got filled. Problem solved.