package com.example.alds1.ten

import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val t = sc.next()
    val p = sc.next()
//    println(t)
    for (i in 0..t.length - p.length) {
//        println(t[i])
        var match = true
        for (j in 0 until p.length) {
//            println(t[i + j] + " " + p[j])
            if (t[i + j] != p[j]) {
//                println("not equal")
                match = false
                break
            }
        }
        if (match) {
            println(i)
        }
    }
}

