#include<cstdio>
#include<vector>
#include<algorithm>
#include<utility>
#include<numeric>
#include<iostream>
#include<array>
#include<string>
#include<sstream>
#include<stack>
#include<queue>
#include<list>
#include<functional>
#define _USE_MATH_DEFINES

#include<math.h>
#include<map>

#define SENTINEL 1000000001

#define min(a,b) (a)>(b)?(b):(a)
#define max(a,b) (a)>(b)?(a):(b)

using namespace std;

typedef pair<int, int> pii;

int main()
{
	string T, P;
	cin >> T >> P;

	for (int i = 0; i != T.size(); i++)
	{
		if (T[i] == P[0])
		{
			bool same = true;
			for (int j = 1; j != P.size(); j++)
			{
				if (T[i + j] != P[j])
				{
					same = false;
					break;
				}
			}
			if (same)
			{
				cout << i << endl;
			}
		}
	}

	return 0;
}
