#GYM104678J. Find the cat
Find the cat
Description
Cats are predators, so they know how to camouflage well and disperse throughout the area. Everything you see can be represented as a string $s$ of lowercase latin letters. There's a cat hiding there if you can choose three indices $i<j<k$ such that the string $\overline{s_i s_j s_k}$ differs from the string $'cat'$ by no more than a character in one position.
For example, in the string $'cpython'$ there is a cat hidden, because you can select indices 1, 2, 4, and then the resulting string $'cpt'$ differs from the string $'cat'$ only in the second character.
Your task is to determine whether the cat is hiding in a given line, and if so, find it.
The input is a string $s$ of lowercase latin letters. The length of the string $|s|$ is such that $3 \leq |s| \leq 2*10^5$.
If the cat is hiding in this string, then print any of the possible places where it could hide. Namely, print three space-separated indices $i, j, k$ such that $1 \leq i < j < k \leq |s|$.
If the cat could not hide in this string, then print -1.
Input
The input is a string $s$ of lowercase latin letters. The length of the string $|s|$ is such that $3 \leq |s| \leq 2*10^5$.
Output
If the cat is hiding in this string, then print any of the possible places where it could hide. Namely, print three space-separated indices $i, j, k$ such that $1 \leq i < j < k \leq |s|$.
If the cat could not hide in this string, then print -1.
cpython
codeforces
thecatishere
1 3 4
-1
4 5 6