output_description: * Calculate the possible index and print in sorted order. The output should be separated with a space. Don't print a space after last number.
    * Put a line break in the end.
input_description: The input is given from standard input in the following format.  
  
      
      
      N
      S_1
      S_2
       :
      S_N
      T
attempt: n = int(input())
  a, z = [], []
  for _ in range(n):
      s = input()
      a.append(s.replace("?", "a"))
      z.append(s.replace("?", "z"))
  t = input()
  a.append(t)
  z.append(t)
  a, z = sorted(a)[::-1], sorted(z)
  r, l = n + 1 - a.index(t), z.index(t) + 1
  for i in range(l, r + 1):
      print(i, end=" ")
  
problem_description: Statement
  
  Mr.X, who the handle name is T, looked at the list which written N handle
  names, S_1, S_2, ..., S_N.  
  But he couldn't see some parts of the list. Invisible part is denoted `?`.  
    
  Please calculate all possible index of the handle name of Mr.X when you sort
  N+1 handle names (S_1, S_2, ..., S_N and T) in lexicographical order.  
  Note: If there are pair of people with same handle name, either one may come
  first.
samples: [{"input": "2\n    tourist\n    petr\n    e", "output": "1\n    \n\nThere are no invisible part, so there are only one possibility. The sorted\nhandle names are `e`, `petr`, `tourist`, so `e` comes first."}]