hackerrank Diwali Lights solution