import java.util.Scanner;
import java.io.File;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: m09aaa
 * Date: 21.10.2009
 * Time: 18:07:58
 * To change this template use File | Settings | File Templates.
 */
public class Search {
        public static void main ( String[] args ) throws Exception {
            Scanner in=new Scanner (new File("count.in"));
            PrintWriter out=new PrintWriter (new File("count.out"));
            String s=in.next();
            String s1=in.next();
            int kol=0;
            int i;
            for (i=0; i<s.length()-s1.length()+1; i++)
            {  String s2=s.substring(i,i+s1.length());
                out.println(s2);
                if (s1.equals(s2))
                {
                    kol++;
                }
            }
            out.println(kol);
            out.close ();
        }
}
