In the UK, recent medical graduates undergo 2 years of 'foundation training' during which they rotate around 6 specialties for 4 months each across 20 locations. All UK graduates are asked to rank their preferred allocations.
Until recently, graduates were ranked from first to last based on performance (e.g. results of a multiple-choice situational judgement test, medical school class rankings, existence of publications). Those at the top would be allocated their first choice before moving down the list. Last year, the system was changed so that graduates are now ranked randomly.