#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
    string s, t;
    cin >> s >> t;
    for (int i = 0; i <= max(0, (int)(s.length() - t.length())); i++) {
        if (t == s.substr(i, t.length())) {
            cout << i << endl;
        }
    }
    return 0;
}
