object Main extends App {
  val sc = new java.util.Scanner(System.in)

  val t = sc.next
  val p = sc.next

  def loop(i:Int): Unit = {
    val res = t.indexOf(p, i)
    if (res >= 0) {
      println(res)
      loop(res + 1)
    }
  }
  loop(0)
}

