Court rules Republicans will go on top of ballots in Nov. 6 election