P13307 Domain Name Judgment

Description

To distinguish between genuine and fake educational websites, you need to write a program to judge website domain names. In this problem, a website domain name must satisfy the following requirements: > - It is a string composed of uppercase and lowercase letters, digits, and `.`. > > - No two `.` are adjacent, and the string does not start or end with a `.`. > > - There is **at least** one `.`. Additionally, in this problem, an educational website domain name must satisfy the following requirements: > - It is a valid website domain name. > > - Let the domain name be in the format $T_1.T_2.\ \dots\ .T_{m-1}.T_m$, where $m$ is a positive integer with $m\geq 3$, and $T_i$ represents the $i$-th maximal contiguous segment consisting only of letters and digits. > > - In the above condition, $T_{m-1}$ must be **equivalent** to $\texttt{edu}$, and $T_m$ must be **equivalent** to $\texttt{cn}$ (in this problem, two strings are **equivalent** if they are equal when case is ignored for letters). You are given a string $S$ of length $n$, guaranteed to conform to the **website domain name format** described above. Let $S_i$ denote the substring of $S$ from the first character to the $i$-th character. For all positive integers $i$ satisfying $1\leq i\leq n$, you need to determine whether $S_i$ is an educational website domain name, i.e., whether it satisfies the **educational website domain name format**. Output all such positive integers $i$ in ascending order. You **do not** need to verify whether the given domain name actually exists.

Input Format

A single line containing the string $S$, guaranteed to conform to the website domain name format described in the problem.

Output Format

A single line containing all positive integers $i$ that satisfy the conditions, listed in ascending order.

Explanation/Hint

### Sample Explanation #1 $S_{13}=\texttt{h5.zxx.edu.CN}$. For $S_{13}$, $m=4$, $T_1=\texttt{h5}$, $T_2=\texttt{zxx}$, $T_3=\texttt{edu}$, $T_4=\texttt{CN}$. Here, $T_3$ is equivalent to $\texttt{edu}$, and $T_4$ is equivalent to $\texttt{cn}$, so $S_{13}$ is an educational website domain name. ### Sample Explanation #2 None of the $S_i$ substrings are educational website domain names. ### Constraints **This problem uses bundled tests.** For all test data: $3\leq n\leq 10^6$. - Subtask 1 (20 points): $n\leq 6$. - Subtask 2 (40 points): $n\leq 1000$. - Subtask 3 (40 points): No additional constraints. By Deepseek V3.