object Main extends App {
  val Array(as, key) = io.Source.stdin.getLines.toArray
  val target: List[(String, Int)] = as.sliding(key.length, 1).toList.zipWithIndex

  for { tup <- target
        if tup._1 == key
  } println(tup._2)
}

