The tests for this problem consist of ten groups. Points for each group are awarded only if all tests of the group and all tests of some of the previous groups are passed. Note that passing the tests from the statement is not required for some groups. \textbf{Offline testing} means that the results of testing your solution on this group will become available only after the end of the competition. The final score for each group equals the maximum score obtained for that group of tests across all submissions.

\medskip
\begin{center}
\small
\begingroup
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
& & \multicolumn{3}{c|}{Additional constraints} & & \\
\cline{3-5}
\raisebox{2.25ex}[0cm][0cm]{Group}
& \raisebox{2.25ex}[0cm][0cm]{Points}
& $T$ & $n$ & $m$ 
& \raisebox{2.25ex}[0cm][0cm]{{\centering Necessary groups}}
& \raisebox{2.25ex}[0cm][0cm]{Comment}
\\
\hline
0 & 0   & --         & --                & --                    & -- & Tests from the statement. \\
\hline
1 & 8   & $T \leq 1$ & --                & --                    & -- &  \\
\hline
2 & 11  & $T \leq 2$ & $n \leq 3$        & $m \leq 4$            & -- &  \\
\hline
3 & 9  & --         & $n = 2$           & --                    & -- & $a_1 = 1, a_2 = m$ \\
\hline
4 & 12  & --         & $n = 2$           & $m \leq 200,000$ & -- & \\
\hline
5 & 8  & --         & $n = 2$           & --                    & 3, 4 & \\
\hline
6 & 14  & $T \leq 2$ & $n \leq 1000$     & $m \leq 1000$         & 2 & \\
\hline
7 & 10  & $T \leq 2$ & --                & --                    & 1, 2, 6 & \\
\hline
8 & 9  & --         & --                &                       & -- & The string $s$ contains only the character $\mathtt{R}$. \\
\hline

9 & 12  & --         & $n \leq 1000$     & $m \leq 1000$         & 0, 2, 6 & \\
\hline
10 & 7 & --         & --                & --                    & 0 -- 9 & \textbf{Offline testing.} \\
\hline

\end{tabular}
\endgroup
\end{center}