var Ġstates Needed Ġ= Ġset Of (" mt ", Ġ" wa ", Ġ" or ", Ġ" id ", Ġ" nv ", Ġ" ut ", Ġ" ca ", Ġ" az ") Ċ val Ġstations Ġ= Ġmap Of ( ĊĠĠĠ Ġ" k one " Ġto Ġset Of (" id ", Ġ" nv ", Ġ" ut "), ĊĠĠĠ Ġ" kt wo " Ġto Ġset Of (" wa ", Ġ" id ", Ġ" mt "), ĊĠĠĠ Ġ" k three " Ġto Ġset Of (" or ", Ġ" nv ", Ġ" ca "), ĊĠĠĠ Ġ" k four " Ġto Ġset Of (" nv ", Ġ" ut "), ĊĠĠĠ Ġ" k five " Ġto Ġset Of (" ca ", Ġ" az ") Ċ ) Ċ Ċ fun Ġmain () Ġ{ ĊĠĠĠ Ġval Ġfinal St ations Ġ= Ġmutable Set Of < String >() ĊĠĠĠ Ġwhile Ġ( states Needed . isNotEmpty ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġbest Station : ĠString ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġvar Ġstates Cover ed Ġ= Ġset Of < String >() ĊĠĠĠĠĠĠĠ Ġstations . forEach Ġ{ Ġ( station , Ġstates ) Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcovered Ġ= Ġstates Needed . intersect ( states ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( covered . size Ġ> Ġstates Cover ed . size ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġbest Station Ġ= Ġstation ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstates Cover ed Ġ= Ġcovered ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġstates Needed Ġ= Ġstates Needed Ġ- Ġstates Cover ed ĊĠĠĠĠĠĠĠ Ġbest Station ?. let Ġ{ Ġfinal St ations . add ( it ) Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġprintln ( final St ations ) Ċ }