#include <stdio.h>
#include <string.h>

int main() {
    char str[100];
    char ch;
    int count[100];
    int pos = 0;
    int flag = 0;
    int i;

    fgets(str, 100, stdin);
    scanf("%c", &ch);

    int len = strlen(str);
    int ch_count = 0;

    for (i = 0; i < len; i++) {
        if (str[i] == ch) {
            count[ch_count + 1] = i;
            ch_count++;
            flag = 1;
        }
    }

    if (flag) {
        count[0] = ch_count;
        printf("%d\n", count[0]);
        for (i = 1; i <= ch_count; i++) {
            printf("%d ", count[i]);
        }
        printf("\n");
    } else {
        printf("No match!\n");
    }

    return 0;
}
