Solution for the CodeBreaker kata