Triple Metre

AtCoder
IDabc230_b
Time2000ms
Memory256MB
Difficulty
A string $S$ is said to be a substring of a string $T$ when there is a pair of integers $i$ and $j$ ($1 \leq i \leq j \leq |T|)$ that satisfy the following condition. * The extraction of the $i$\-th through $j$\-th characters of $T$ without changing the order equals $S$. Let $T$ be the concatenation of $10^5$ copies of `oxx`. Given a string $S$, print `Yes` if $S$ is a substring of $T$, and `No` otherwise. ## Constraints * $S$ is a string consisting of `o` and `x`. * The length of $S$ is between $1$ and $10$ (inclusive). ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
xoxxoxxo
Output #1
Yes

$T$ begins like this: `oxxoxxoxxoxx`... Since the extraction of $3$\-rd through $10$\-th characters of $T$ equals $S$, $S$ is a substring of $T$, so `Yes` should be printed.
Input #2
xxoxxoxo
Output #2
No

Since there is no way to extract from $T$ a string that equals $S$, $S$ is not a substring of $T$, so `No` should be printed.
Input #3
ox
Output #3
Yes
API Response (JSON)
{
  "problem": {
    "name": "Triple Metre",
    "description": {
      "content": "A string $S$ is said to be a substring of a string $T$ when there is a pair of integers $i$ and $j$ ($1 \\leq i \\leq j \\leq |T|)$ that satisfy the following condition. *   The extraction of the $i$\\-t",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc230_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "A string $S$ is said to be a substring of a string $T$ when there is a pair of integers $i$ and $j$ ($1 \\leq i \\leq j \\leq |T|)$ that satisfy the following condition.\n\n*   The extraction of the $i$\\-t...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments