Three runners A, B and C run a race, with runner A finishing 12 metres ahead of runner B and 18 metres ahead of runner C, while runner B finishes 8 metres ahead of runner C. Each runner travels the entire distance at a constant speed. What was the length of the race?