Mutation
Scientists on the planet Olympia are on the verge of identifying the characteristic genome of the Olympic amoeba species. They have discovered a sequence of genes that contains exactly one additional gene. The next step for the scientists is to determine which genes in this sequence could be the extra one. To achieve this, they compare the sequence with the genome of an organism that is a confirmed representative of the species.
Both the sequence of genes and the organism's genome can be represented as strings of lowercase English letters, where each letter denotes a distinct gene. An organism A is considered to belong to species X if you can remove certain characters from the genome string of organism A to match the characteristic genome string of species X.
Your task is to write a program that, given the gene sequence discovered by the scientists and the genome of the species representative, identifies the indices of all genes that could be the extra one in the discovered sequence.
Input
The input consists of two strings. The first string is the sequence of genes found by the scientists. The second string is the genome of the species representative. Both strings are non-empty, consist of lowercase Latin letters, and each has a length of no more than 40,000 characters.
Output
The output should start with a single integer, indicating the number of genes that could potentially be extra in the sequence found by the scientists. The second line should list the indices of all such genes in ascending order. It is guaranteed that there is at least one extra gene.
Example Explanation: From the sequence adca, either the gene d or the gene c must be removed. In the first scenario, removing d results in the sequence aca, which can be derived from the genome as follows: abcdaba. In the second scenario, removing c results in the sequence ada, which can be derived as: abcdaba.