My solution to https://www.hackerrank.com/challenges/heros-and-heroines-villains-and-villainesses