
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
The side length of the base of a regular quadrilateral pyramid is \( a \). The centers of two spheres of radius \( r \), contained within the pyramid, are located on its height. The first sphere touches the plane of the pyramid's base, and the second sphere touches the first sphere and the planes of all the pyramid's lateral faces. Find the height of the pyramid.

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