1 #include <stdio.h>
2 #include <string.h>
3 #define N 20
4 int main()
5 {
6 char str1[N], str2[N], str3[N];
7 int i, r=0, lenth1, lenth2;
8 scanf("%s%s", str1, str2);
9 lenth1 = strlen(str1);
10 lenth2 = strlen(str2);
11 for(i=0;i<lenth1;i++)
12 {
13 if(str1[i] == str2[0])
14 {
15 for(r=0;r<lenth2;r++)
16 {
17 if(str1[i+r] == str2[r])
18 {
19 str3[r] = str2[r];
20 }
21 else if(str1[i+r] != '\0')
22 {
23 break;
24 }
25 else
26 {
27 str3[r] = '\0';
28 }
29 }
30 }
31 }
32 printf("%s\n", str3);
33 return 0;
34 }