Logic for races in repechage