{"raw_statement":[{"iden":"problem statement","content":"There is a row of $N$ people. They are described by a string $S$ of length $N$. The $i$\\-th person from the front is male if the $i$\\-th character of $S$ is `M`, and female if it is `F`.\nDetermine whether the men and women are alternating.\nIt is said that the men and women are alternating if and only if there is no position where two men or two women are adjacent."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 100$\n*   $N$ is an integer.\n*   $S$ is a string of length $N$ consisting of `M` and `F`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"6\nMFMFMF"},{"iden":"sample output 1","content":"Yes\n\nThere is no position where two men or two women are adjacent, so the men and women are alternating."},{"iden":"sample input 2","content":"9\nFMFMMFMFM"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"1\nF"},{"iden":"sample output 3","content":"Yes"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}