{"raw_statement":[{"iden":"problem statement","content":"You are given a string $S$ of length $N$ consisting of `A`, `B`, and `C`.  \nFind the position where `ABC` first appears as a (contiguous) substring in $S$. In other words, find the smallest integer $n$ that satisfies all of the following conditions.\n\n*   $1 \\leq n \\leq N - 2$.\n*   The string obtained by extracting the $n$\\-th through $(n+2)$\\-th characters of $S$ is `ABC`.\n\nIf `ABC` does not appear in $S$, print `-1`."},{"iden":"constraints","content":"*   $3 \\leq N \\leq 100$\n*   $S$ is a string of length $N$ consisting of `A`, `B`, and `C`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"8\nABABCABC"},{"iden":"sample output 1","content":"3\n\n`ABC` first appears in $S$ at the $3$\\-rd through $5$\\-th characters of $S$. Therefore, the answer is $3$."},{"iden":"sample input 2","content":"3\nACB"},{"iden":"sample output 2","content":"\\-1\n\nIf `ABC` does not appear in $S$, print $-1$."},{"iden":"sample input 3","content":"20\nBBAAABBACAACABCBABAB"},{"iden":"sample output 3","content":"13"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}