output_description: For each question, print 1 if the text includes P_i, or print 0 otherwise.
input_description: In the first line, a text T is given. In the second line, an integer Q
  denoting the number of queries is given. In the following Q lines, the
  patterns P_i are given respectively.
attempt: # coding: utf-8
  original_string = list(map(ord, list(input())))
  check_string_count = int(input())
  checkers = [list(map(ord, list(input()))) for i in range(check_string_count)]
  for checker in checkers:
      found = False
      sum_of_checker = sum(checker)
      if len(checker) > len(original_string):
          print(0)
          continue
      for index in range(0, len(original_string)):
          if (len(original_string) - len(checker)) < index:
              break
          if original_string[index] == checker[0]:
              found = True
              sum_of_origin = sum(original_string[index : index + len(checker)])
              if sum_of_origin != sum_of_checker:
                  found = False
              if found:
                  print(1)
                  break
      if not found:
          print(0)
  
problem_description: String Search
  
  Determine whether a text T includes a pattern P. Your program should answer
  for given queries consisting of P_i.
samples: [{"input": "aabaaa\n    4\n    aa\n    ba\n    bb\n    xyz", "output": "1\n    1\n    0\n    0"}]