output_description: Print the minimum possible length of s.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a
      b
      c
attempt: l = ["", "", ""]
  d = [["", "", ""], ["", "", ""], ["", "", ""]]
  l[0] = str(input())
  l[1] = str(input())
  l[2] = str(input())
  for i in range(3):
      for j in range(3):
          if i != j:
              p = min(len(l[i]), len(l[j]))
              s = 0
              for k in reversed(range(p)):
                  t = 0
                  for x in range(k + 1):
                      if l[i][x - k - 1] != l[j][x]:
                          if (l[i][x - k - 1] != "?") & (l[j][x] != "?"):
                              t = 1
                              break
                  if t == 0:
                      s = k + 1
                      break
              d[i][j] = s
  r = len(l[0]) + len(l[1]) + len(l[2])
  u = (d[0][1] + d[1][2] + d[2][0]) - min(min(d[0][1], d[1][2]), d[2][0])
  v = (d[1][0] + d[2][1] + d[0][2]) - min(min(d[1][0], d[2][1]), d[0][2])
  print(r - min(u, v))
  
problem_description: Statement
  
  Snuke has a string s. From this string, Anuke, Bnuke, and Cnuke obtained
  strings a, b, and c, respectively, as follows:
  
    * Choose a non-empty (contiguous) substring of s (possibly s itself). Then, replace some characters (possibly all or none) in it with `?`s.
  
  For 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`.
  
  You are given the strings a, b, and c. Find the minimum possible length of s.
samples: [{"input": "a?c\n    der\n    cod", "output": "7\n    \n\nFor example, s could be `atcoder`.\n\n* * *"}, {"input": "atcoder\n    atcoder\n    ???????", "output": "7\n    \n\na, b, and c may not be distinct."}]