Rail construction unearths thousands of skeletons