object Main {
    def s(a: String, b: String, i: Int): Unit = {
        if (a.size >= b.size) {
            if (a startsWith b) println(i)
            s(a.tail, b, i+1)
        }
    }
    def main(args: Array[String]) = {
        val Seq(a, b) = io.Source.stdin.getLines.toSeq
        s(a, b, 0)
    }
}