
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
Petya invented a four-digit number in which all the digits are different. It is known that the sum of the first three digits of this number is divisible by 9, and the sum of the last three digits of this number is divisible by 9. What values can the sum of all the digits of this number take? Find all possible values and explain why there are no others.

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