import java.io.*; class dotplot { public static void main(String[] args) throws Exception { BufferedReader infile = null; try { infile = new BufferedReader(new FileReader("input.txt")); } catch (Exception e) { System.err.println("Hey! Where's the input file?"); } char[] A = infile.readLine().toCharArray(); char[] B = infile.readLine().toCharArray(); int w = Integer.parseInt(infile.readLine()); int k = Integer.parseInt(infile.readLine()); int m = A.length; int n = B.length; int[][] dotplot = new int[m - w + 1][n - w + 1]; for (int i=0; i < m - w + 1; ++i) { for (int j=0; j < n - w + 1; ++j) { int count = 0; for (int l=0; l < w; ++l) { if (A[i + l] == B[j + l]) ++count; } dotplot[i][j] = (count >= k ? 1 : 0); } } for (int i=0; i < m - w + 1; ++i) { for (int j=0; j < n - w + 1; ++j) { System.out.print(dotplot[i][j] + " "); } System.out.println(); } } }