#include using namespace std;const int N = 10010;int get_Next(string T, int ne[]) { ne[1] = 0; int i = 1, j = 0; while (i if (j == 0 || T[i] == T[j]) ne[++i] = ++j; else j = ne[j]; }}int Index_KMP(string S, string T, int ne[]) { int i = 1, j = 1; while (i if (j == 0 || S[i] == T[j]) { i++; j++; } else { j = ne[j]; } } if (j > T.length()) return i - T.length(); else return 0;}string S, T;int ne[N];int main() { cin >> S >> T; get_Next(T, ne); for (int i = 0; i cout } cout return 0;}