/*
 * a.cc: 
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>

using namespace std;

/* constant */

const int MAX_N = 1000;

/* typedef */

/* global variables */

/* subroutines */

/* main */

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

  int tn = t.size(), pn = p.size();

  for (int i = 0; i <= tn - pn; i++) {
    bool ok = true;
    for (int j = 0; j < pn; j++)
      if (t[i + j] != p[j]) {
	ok = false;
	break;
      }
    if (ok) printf("%d\n", i);
  }
  return 0;
}