PROGRAMMING:String pattern matching
Given the main string s and mode string P, the program outputs the first position of P in S. if P is not in s, it outputs - 1. The string subscript starts at 0.
###Input format:
The input is 2 lines, the first line is the main string s, and the second line is the behavior pattern string P. The length of main string and mode string shall not exceed 100000.
###Output format:
The output is 2 lines, the first line is several integers, which represents the failure function value of pattern string P, and each integer is followed by a space; The second line is an integer representing the first position of P in S. if P is not in s, then - 1 is output.
###Input example:
Here is a set of inputs. For example:
```in
qwerabcabhlk
abcab
```
###Output example:
The corresponding output is given here. For example:
```out
-1 -1 -1 0 1
four
```
answer:If there is no answer, please comment
###Input format:
The input is 2 lines, the first line is the main string s, and the second line is the behavior pattern string P. The length of main string and mode string shall not exceed 100000.
###Output format:
The output is 2 lines, the first line is several integers, which represents the failure function value of pattern string P, and each integer is followed by a space; The second line is an integer representing the first position of P in S. if P is not in s, then - 1 is output.
###Input example:
Here is a set of inputs. For example:
```in
qwerabcabhlk
abcab
```
###Output example:
The corresponding output is given here. For example:
```out
-1 -1 -1 0 1
four
```
answer:If there is no answer, please comment