Given two strings, and , where is the pattern and is the text in which we will search for using a modified naive search algorithm. This algorithm compares the characters of with each substring of of the same length as . The substrings of are checked from left to right, while the characters of the pattern are compared from right to left.
The first line of the input contains the pattern .
The second line contains the text .
1 \leq size(P) \leq 100
1 \leq size(T) \leq 100
On the first line of the output, list all starting positions in where the pattern is found, separated by spaces. If the pattern does not occur in the text, output .
On the second line, output the total number of character comparisons made.
The format of input and output data should match the example provided.
Example 1