import java.util.*;
import java.io.*;

public class Count {

	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(new  File("count.in"));
		PrintWriter out = new PrintWriter("count.out");
		int i = 0;
		String s = in.nextLine();
		String s1 = in.nextLine();
		s = s.toLowerCase();
		s1 = s1.toLowerCase();
		int sum=0;
		  //if (s.length() < s1.length()) out.print(i);
		  //else{
		    String s2;
			while (i<= s.length()-s1.length()){
				s2 = s.substring(i,s1.length()+ i);
				System.out.print(s2+" ");
				
				for(int j = 0;j<=s2.length()-1;j++){
					
					if (s1.charAt(j) == s2.charAt(j)){
						continue;
					}else{
						sum-=sum;
						break;
				}
				}
				sum+=sum;
				
				
			
				i++;
			//}
		}
			out.print(sum);
		out.close();
		in.close();
	}

}