{"problem":{"name":"Alternately","description":{"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`. Determine whe","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc296_a"},"statements":[{"statement_type":"Markdown","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.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100$\n*   $N$ is an integer.\n*   $S$ is a string of length $N$ consisting of `M` and `F`.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc296_a","tags":[],"sample_group":[["6\nMFMFMF","Yes\n\nThere is no position where two men or two women are adjacent, so the men and women are alternating."],["9\nFMFMMFMFM","No"],["1\nF","Yes"]],"created_at":"2026-03-03 11:01:14"}}