The king called to his supper Prince William. He told him that if the prince wants to rule the kingdom, then he should have the intelligence and ability to think strategically. The prince thought that this problem is very simple for him, but he was clearly wrong. The king gave him the job, and where you need to demonstrate their ability. Help him solve the problem.