Add TP1 exo2 implementation (question 1).