All the 36 Selkirk locomotives (5900 through 5935) were initially assigned to handle both freight as well as passenger trains between the major division points of Calgary and Revelstoke, a distance of 262 miles .