{"raw_statement":[{"iden":"problem statement","content":"Snuke has a string $s$. From this string, Anuke, Bnuke, and Cnuke obtained strings $a$, $b$, and $c$, respectively, as follows:\n\n*   Choose a non-empty (contiguous) substring of $s$ (possibly $s$ itself). Then, replace some characters (possibly all or none) in it with `?`s.\n\nFor example, if $s$ is `mississippi`, we can choose the substring `ssissip` and replace its $1$\\-st and $3$\\-rd characters with `?` to obtain `?s?ssip`.\nYou are given the strings $a$, $b$, and $c$. Find the minimum possible length of $s$."},{"iden":"constraints","content":"*   $1 \\leq |a|, |b|, |c| \\leq 2000$\n*   $a$, $b$, and $c$ consists of lowercase English letters and `?`s."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$a$\n$b$\n$c$"},{"iden":"sample input 1","content":"a?c\nder\ncod"},{"iden":"sample output 1","content":"7\n\nFor example, $s$ could be `atcoder`."},{"iden":"sample input 2","content":"atcoder\natcoder\n???????"},{"iden":"sample output 2","content":"7\n\n$a$, $b$, and $c$ may not be distinct."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}