Sample solution for the EAI exercises