#include<cstdio>
#include<cstring>
using namespace std;
const int N = 1e6 + 10;
char s[N], p[N], ans[N];
int n, m, top, Next[N], f[N];
void get_Next() {
for (int i = 2, j = 0; i <= m; i++) {
while (j && p[i] != p[j + 1]) j = Next[j];
if (p[i] == p[j + 1]) j++;
Next[i] = j;
}
}
void Kmp() {
for (int i = 1, j = 0; i <= n; i++) {
ans[top] = s[i];
while (j && (j == m || s[i] != p[j + 1])) j = Next[j];
if (s[i] == p[j + 1]) j;
}
int main() {
scanf("%s%s", s + 1, p + 1);
n = strlen(s + 1);
m = strlen(p + 1);
}