A long time ago, a king held a banquet to celebrate his birthday, and he invited lots of guests sitting in a large round table. The king prepared several kinds of food, and he wants any two guests sit at a distance of three enjoys different kind of food.
But how many plans can be there? Because the number can be huge, output the its last four digits will be fine.