#include <bits/stdc++.h>
using namespace std;
int main(){
  string T;
  cin >> T;
  string P;
  cin >> P;
  int N = T.size();
  int M = P.size();
  vector<int> ans;
  for (int i = 0; i <= N - M; i++){
    bool ok = true;
    for (int j = 0; j < M; j++){
      if (T[i + j] != P[j]){
        ok = false;
      }
    }
    if (ok){
      ans.push_back(i);
    }
  }
  int cnt = ans.size();
  for (int i = 0; i < cnt; i++){
    cout << ans[i] << endl;
  }
}
