Itertools Product Hackerrank Solution Cpp