Kata 5: Solution for Kata 5.