#include <iostream>
using namespace std;

int main(){
    string a, b;
    cin >>a >> b;
    if (a.size() < b.size()) return 0;
    for (int i=0;i<=a.size()-b.size();i++){
        bool isMatch=true;
        for (int j=0;j<b.size();j++)
            if (a.at(i+j) != b.at(j)) isMatch = false;
        if (isMatch) cout << i << endl;
    }
}
