#include <bits/stdc++.h>
using namespace std;
bool same(char x, char y)
{
if(x == y || x == '?' || y == '?')return true;
else return false;
}
int main()
{
string a, b;
cin >> a >> b;
if(a.size() == 1 && b.size() == 1)
{
if(a == b || a == "?" || b == "?")cout << "1 1";
return 0;
}
if(a.size() < b.size())return 0;
for(int i = 0; i < a.size(); i++)
{
bool flag = true;
for(int j = 0; j < b.size(); j++)
{
if(!same(a[i + j], b[j]))
{
flag = false;
break;
}
}
if(flag)cout << i + 1<< " " << i + b.size() << endl;
}
return 0;
}
T7的第4个样例没过,但是下面的数据全过了,这数据咋回事