#include #include using namespace std; int main() { const int MOD_1=1e9+7; const int MOD_2=1e9+9; const int OSN_1=29; const int OSN_2=31; int hashWord_1=0; int hashWord_2=0; int hashText_1=0; int hashText_2=0; ifstream input; ofstream output; input.open("string.in"); output.open("string.out"); string A,B,R,C; int K; input>>A>>B>>R>>C>>K; string f,s,c; f=A; s=B; string text; if(K==1) { text=f; } int n=R.size(); for(int i=2; i