{"problem":{"name":"Shiritori","description":{"content":"You are given three strings $A$, $B$ and $C$. Check whether they form a _word chain_. More formally, determine whether both of the following are true: *   The last character in $A$ and the initial ch","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc060_a"},"statements":[{"statement_type":"Markdown","content":"You are given three strings $A$, $B$ and $C$. Check whether they form a _word chain_.\nMore formally, determine whether both of the following are true:\n\n*   The last character in $A$ and the initial character in $B$ are the same.\n*   The last character in $B$ and the initial character in $C$ are the same.\n\nIf both are true, print `YES`. Otherwise, print `NO`.\n\n## Constraints\n\n*   $A$, $B$ and $C$ are all composed of lowercase English letters (`a` - `z`).\n*   $1 ≤ |A|, |B|, |C| ≤ 10$, where $|A|$, $|B|$ and $|C|$ are the lengths of $A$, $B$ and $C$, respectively.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$A$ $B$ $C$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc060_a","tags":[],"sample_group":[["rng gorilla apple","YES\n\nThey form a word chain."],["yakiniku unagi sushi","NO\n\n$A$ and $B$ form a word chain, but $B$ and $C$ do not."],["a a a","YES"],["aaaaaaaaab aaaaaaaaaa aaaaaaaaab","NO"]],"created_at":"2026-03-03 11:01:14"}}