Student excercise codewars solution.