
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Ivan Tsarevich is fighting the Dragon Gorynych on the Kalinov Bridge. The Dragon has 198 heads. With one swing of his sword, Ivan Tsarevich can cut off five heads. However, new heads immediately grow back, the number of which is equal to the remainder when the number of heads left after Ivan's swing is divided by 9. If the remaining number of heads is divisible by 9, no new heads grow. If the Dragon has five or fewer heads before the swing, Ivan Tsarevich can kill the Dragon with one swing. How many sword swings does Ivan Tsarevich need to defeat the Dragon Gorynych?

Present the answer in LaTex format: \boxed{Your answer}
user