Given two strings, and . Here, is referred to as the pattern, and is the text in which we will search for using the naive search algorithm. This algorithm involves comparing character by character with each substring of that has the same length as . The substrings of are checked from left to right, and the characters within the strings are also compared from left to right.
The first line of the input contains the pattern (where 1 \leq \text{size}(P) \leq 100), and the second line contains the text (where 1 \leq \text{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 does not occur in , output on the first line.On the second line, provide the total number of character comparisons made during the search.Ensure that the format of the input and output data matches the provided example.
Example 1