Add exercise3 solution