Maximally Selected Rank Statistics