Second assignment for Artificial Intelligence 2.