{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Alice was bored with the game tic-tac-toe. Usually she used to play against computer. She was so bored because, she always managed to make a tie against computer as she already became an expert in this game. She was also bored about the matching things, that means she does not like to see two adjacent`X`s or two adjacent `O`s. So Bob created a new computer game for her.\n\nHere is the description of this new 2-player game:\n\n1. A **1 x N** grid will be given.\n2. In each turn, a player can mark an unmarked cell by an `X` or by an `O` (it\u0027s not a Zero it is a big `O`).\n3. No two adjacent `X`s are allowed in this game.\n4. No two adjacent `O`s are allowed in this game.\n5. The player who marks the last cell wins the game.\n\nLet\u0027s have an example for **N \u003d 3**. Suppose first player mark the leftmost cell with an `X`. Then the grid will look like this:\n\n![First Player with an X](CDN_BASE_URL/972762f0e5f7094499522b5b579a7a19?v\u003d1716004906)\n\nFrom this state, the winning move of the second player is to mark the rightmost cell with an `O`.\n\n![Second Player with an O](CDN_BASE_URL/b2f5a43200def24db26e550c1caad0a5?v\u003d1716004906)\n\nNow first player has no move, because in the only empty cell she cannot mark `X` and cannot mark `O` because the left of this cell is already marked `X` and the right of this cell is marked `O`. The second player will win.\n\nBut this is not an optimal example for first player. If in first move, the first player marks the middle cell with any one of `X` or `O`, she will win.\n\nNow, Alice always makes the first move. Alice usually used to start playing with Bob. But most often after some move, Bob gave his responsibility to the computer. Computer always plays optimally. You are given the state of the grid after Bob\u0027s departure and your task is to determine whether it is possible to win against computer from this state for Alice."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 10000)**, denoting the number of test cases. \n\nEach case starts with a line containing a string which represents the state of the game after Bob\u0027s departure. Here the length of the string is **N (1 \u0026le; N \u0026le; 100)**. In this string besides `X` and `O`, another character `.` is used, which represents an unmarked cell."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and `Yes` if it is possible to win against computer, otherwise print `No`."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n...\nX..\n....O\n..X..\nO\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: Yes\nCase 2: No\nCase 3: No\nCase 4: Yes\nCase 5: Yes\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}