Hackerrank:Sherlock and Pairs. 'Elementary my Dear Watson, Elementary' - Sherlock