import scala.io.StdIn.readLine

object Main {
  def main(args:Array[String]) = {
    val s1 = readLine
    val s2 = readLine
    for(i<-0 to s1.length-s2.length)
      if(s1(i)==s2(0))
        if(s1.slice(i,i+s2.length)==s2)
          println(i)
  }
}