output_description: Print the number of unordered pairs (S_i, S_j) where i \neq j and Limak can
  obtain one string from the other.
  
  * * *
input_description: Input is given from Standard Input in the following format.
  
      
      
      N
      S_1
      S_2
      \vdots
      S_N
attempt: n = int(input())
  data = []
  count = 1
  for i in range(n):
      data.append(input())
  print(data)
  for i in range(n):
      for j in range(n):
          if i < j:
              if len(data[i]) <= len(data[j]):
                  data_s = data[i]
                  data_l = data[j]
              if len(data[i]) > len(data[j]):
                  data_s = data[j]
                  data_l = data[i]
              while len(data_l) > len(data_s):
                  data_l = data_l[2:]
                  if len(data_l) == len(data_s):
                      count += 1
  print(count)
  
problem_description: Statement
  
  Limak can repeatedly remove one of the first two characters of a string, for
  example abcxyx \rightarrow acxyx \rightarrow cxyx \rightarrow cyx.
  
  You are given N different strings S_1, S_2, \ldots, S_N. Among N \cdot (N-1) /
  2 pairs (S_i, S_j), in how many pairs could Limak obtain one string from the
  other?
samples: [{"input": "3\n    abcxyx\n    cyx\n    abc", "output": "1\n    \n\nThe only good pair is (abcxyx, cyx).\n\n* * *"}, {"input": "6\n    b\n    a\n    abc\n    c\n    d\n    ab", "output": "5\n    \n\nThere are five good pairs: (b, abc), (a, abc), (abc, c), (b, ab), (a, ab)."}]