https://www.hackerrank.com/contests/overnite2014/challenges/hogwart