Hackerearth: Find Product

code: