Imagine that you have 25 racehorses and you want to find the fastest three.

You can stage races of up to five of them at a time, but you do not have any method of timing them (i.e. you can only see how they fare in individual races).

What is the minimum number of races needed to find the top three (not necessarily in order)?