#include <bits/stdc++.h>
#define ll long long
#define fr(i, a, b) for (ll i = a; i < b; i++)
#define mmst(i,a) memset(i,a,sizeof(i))
#define all(i) i.begin(),i.end()
#define allr(i) i.rbegin(),i.rend()
#define caseout cout << "Case " << tc << ": ";
#define fast                          \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
using namespace std;
const ll mod=1e9+7;

void solve()
{
    string s1,s2;
    cin>>s1>>s2;
    ll dhv=0;
    ll pow=1;
    fr(i,0,s2.size()){
        dhv+=((s2[i]-'a'+1)*pow)%mod;
        pow=(pow*31)%mod;
    }
    ll pref[s1.size()+1];
    ll currPow[s1.size()];
    pref[0]=0;
    pow=1;
    fr(i,0,s1.size()){
        pref[i+1]=(pref[i]+((s1[i]-'a'+1)*pow))%mod;
        currPow[i]=pow;
        pow=(pow*31)%mod;
    }
    ll sp=0,ep=s2.size();
    vector<ll> ans;
    while(ep<=s1.size()){
        if((pref[ep]-pref[sp]+mod)%mod==((dhv*currPow[sp])%mod)){
            ans.push_back(sp+1);
        }
        sp++;ep++;
    }
    // cout<<dhv<<endl;
    if(ans.size()==0){
        cout<<"Not Found"<<endl;
        cout<<endl;
        return;
    }
    cout<<ans.size()<<endl;
    for(auto it: ans)cout<<it<<" ";cout<<endl;cout<<endl;
}
int main()
{
    fast ll T = 1;
    cin >> T;
    for (int tc = 1; tc <= T; tc++)
    {
        // cout<<"Case "<<tc<<": ";
        solve();
    }
}