North interview question

Complete code unique device namer