A coding exercise.