
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
Given a known sequence \( r_{1}, r_{2}, r_{3}, \cdots, r_{n} \) consisting of distinct real numbers, a single operation consists of comparing the second element with the first element, and if the second element is smaller, swapping them; continuing this process for subsequent pairs until the last element is compared with its new preceding element and swapped if it is smaller. For example, the sequence \( 1, 9, 8, 7 \) can be transformed into \( 1, 8, 7, 9 \) through a single operation, as demonstrated below:

\[
\begin{array}{llll}
1 & 9 & 8 & 7 \\
1 & 9 & 8 & 7 \\
1 & 8 & 9 & 7 \\
1 & 8 & 7 & 9
\end{array}
\]

Evidently, any given sequence can be converted into an increasing sequence through one or more such operations.

Suppose \( n = 40 \) and \( r_{1}, r_{2}, \cdots, r_{40} \) are distinct and randomly arranged. Let \(\frac{p}{q}\) (a reduced fraction) represent the probability that the original 20th element \( (r_{20}) \) ends up as the 30th element after one operation. Find the value of \( p + q \).

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