{"raw_statement":[{"iden":"problem statement","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`."},{"iden":"constraints","content":"*   $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."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$ $C$"},{"iden":"sample input 1","content":"rng gorilla apple"},{"iden":"sample output 1","content":"YES\n\nThey form a word chain."},{"iden":"sample input 2","content":"yakiniku unagi sushi"},{"iden":"sample output 2","content":"NO\n\n$A$ and $B$ form a word chain, but $B$ and $C$ do not."},{"iden":"sample input 3","content":"a a a"},{"iden":"sample output 3","content":"YES"},{"iden":"sample input 4","content":"aaaaaaaaab aaaaaaaaaa aaaaaaaaab"},{"iden":"sample output 4","content":"NO"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}