#include using namespace std; using ll=long long; using ull=unsigned long long; using pii=pair; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(),a.end() #define rrng(a) a.end(),a.begin() #define rep(i,N) for(int i=0;i RH(string S,string T){ int SN=S.size(); int TN=T.size(); int_fast64_t b=9973; vectormod={1000000007LL,1000000009LL,1000000021LL}; int M=mod.size(); vectors(M,0); vectort(M,0); vectora(M,1); for(int i=0;ires; bool ok=true; for(int i=0;i>S>>T; auto rh=RH(S,T); if(T.size()==1&&rh.size()!=0){ cout<<-1<rh[i+1])i++; } } cout<