#include<iostream>
#include<string>
using namespace std;

int main()
{
	string a,b;
	cin >> a >> b;
	int last = a.size() - b.size() + 1;
	for(int i = 0;i < last;i++)
	{
		if(a[i] == b[0])
		{
			for(int j = 0;j < b.size();j++)
			{
				if(a[i+j] != b[j])break;
				if(j == b.size() -1) cout << i << endl;
			}
		}
	}
	return 0;
}