North interview question

Code a simple creating pairs problem