#include <bits/stdc++.h>

using namespace std;

int main(void) {
  string t, p;
  cin >> t >> p;

  int tz = t.size(), pz = p.size();
  vector<bool> f(tz);
  for (int i = 0; i < tz; i++) {
    bool flag = true;
    for (int j = 0; j < pz; j++) {
      flag &= t[i + j] == p[j];
    }
    f[i] = flag;
  }

  for (int i = 0; i < tz; i++) {
    if (!f[i]) continue;
    cout << i << endl;
  }

  return 0;
}
