output_description: Print an index of T where P found in a line. Print the indices in ascending
  order.
input_description: In the first line, a text T is given. In the second line, a string P is given.
attempt: if __name__ == "__main__":
      # ??????????????\???
      # T = 'aabaaabaaabaa'
      # P = 'aa'
      T = input()
      P = input()
  
      p_len = len(P)
      # ????????????????´¢
      results = []
      offset = 0
      while len(T) >= p_len:
          truncate = 1
          mismatch_at = 0
          match = True
          for i in range(p_len):
              if T[i] != P[i]:
                  match = False
                  mismatch_at = i + 1
                  break
          if match is True:
              results.append(offset)
          else:
              truncate = mismatch_at
          T = T[truncate:]
          offset += truncate
  
      # ???????????¨???
      for r in results:
          print(r)
  
problem_description: String Search
  
  Find places where a string P is found within a text T. Print all indices of T
  where P found. The indices of T start with 0.
samples: [{"input": "aabaaa\n    aa", "output": "0\n    3\n    4"}, {"input": "xyzz\n    yz", "output": "1"}, {"input": "abc\n    xyz", "output": "The output should be empty."}]