#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 1000000001
#define EPS 1.0e-6

using namespace std;

typedef long long ll;

string t;
string p;


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

	int tlen = t.length();
	int plen = p.length();

	for (int i = 0; i <= tlen - plen; i++) {
		if (t[i] == p[0]) {
			int ope = 0;
			int j = 1;
			while (j < plen ) {
				if (t[i + j] == p[j])j++;
				else {
					ope = 1; break;
				}
			}
			if (ope == 0)cout << i << endl;
		}
	}
	return 0;
}