Itertools.combinations Hackerrank Solution