#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int strlen(char *);
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int i;
  for (i = 0; i < n; i++) {
    char string[100];
    scanf("%s", &string);
    if (strlen(string) > m) {
      int j = 0;
      while ((j + m) <= strlen(string)) {
        int temp = 0;
        for (temp = j; temp < (j + m); temp++) {
          printf("%c", string[temp]);
        }
        j++;
        printf("\n");
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1256 <main+0x126>
lea    0xe94(%rip),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
cmp    -0xc(%rbp),%eax
jle    1243 <main+0x113>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8c(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x8c(%rbp),%eax
cmp    %ecx,%eax
jg     123e <main+0x10e>
movl   $0x0,-0x88(%rbp)
mov    -0x84(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    -0x84(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    121c <main+0xec>
movslq -0x88(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%esi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    11d7 <main+0xa7>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1199 <main+0x69>
jmp    1243 <main+0x113>
jmp    1248 <main+0x118>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115f <main+0x2f>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
lea    0xeba(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    120a <main+0xda>
lea    0xe9d(%rip),%r14
lea    0x10(%rsp),%r15
xor    %r12d,%r12d
jmp    118b <main+0x5b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12d
cmp    0xc(%rsp),%r12d
jge    120a <main+0xda>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    0x8(%rsp),%ebx
cmp    %ebx,%eax
jle    1180 <main+0x50>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jg     1180 <main+0x50>
xor    %ebp,%ebp
jmp    11e0 <main+0xb0>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%ebx
add    %ebp,%ebx
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    %eax,%ebx
jg     1180 <main+0x50>
cmpl   $0x0,0x8(%rsp)
jle    11c0 <main+0x90>
mov    %rbp,%rbx
nopw   0x0(%rax,%rax,1)
movsbl 0x10(%rsp,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
mov    0x8(%rsp),%eax
add    %ebp,%eax
cmp    %ebx,%eax
jg     11f0 <main+0xc0>
jmp    11c0 <main+0x90>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
store i32 0, i32* %4
br label %9
9: ; preds = %51, %0
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %54
13: ; preds = %9
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [100 x i8]* %5)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = load i32, i32* %3
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %50
19: ; preds = %13
store i32 0, i32* %6
br label %20
20: ; preds = %45, %19
%21 = load i32, i32* %6
%22 = load i32, i32* %3
%23 = add nsw i32 %21, %22
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
%26 = icmp sle i32 %23, %25
br i1 %26, label %27, label %49
27: ; preds = %20
store i32 0, i32* %7
%28 = load i32, i32* %6
store i32 %28, i32* %7
br label %29
29: ; preds = %42, %27
%30 = load i32, i32* %7
%31 = load i32, i32* %6
%32 = load i32, i32* %3
%33 = add nsw i32 %31, %32
%34 = icmp slt i32 %30, %33
br i1 %34, label %35, label %45
35: ; preds = %29
%36 = load i32, i32* %7
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %35
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %29
45: ; preds = %29
%46 = load i32, i32* %6
%47 = add nsw i32 %46, 1
store i32 %47, i32* %6
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %20
49: ; preds = %20
br label %50
50: ; preds = %49, %13
br label %51
51: ; preds = %50
%52 = load i32, i32* %4
%53 = add nsw i32 %52, 1
store i32 %53, i32* %4
br label %9
54: ; preds = %9
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %48
9: ; preds = %0
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
br label %11
11: ; preds = %9, %44
%12 = phi i32 [ 0, %9 ], [ %45, %44 ]
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [100 x i8]* %3)
%14 = call i32 @strlen(i8* %10)
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %44
17: ; preds = %11
%18 = call i32 @strlen(i8* %10)
%19 = icmp sgt i32 %15, %18
br i1 %19, label %44, label %20
20: ; preds = %17, %36
%21 = phi i64 [ %37, %36 ], [ 0, %17 ]
%22 = trunc i64 %21 to i32
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %36
25: ; preds = %20, %25
%26 = phi i64 [ %31, %25 ], [ %21, %20 ]
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = call i32 @putchar(i32 %29)
%31 = add nuw i64 %26, 1
%32 = load i32, i32* %2
%33 = add nsw i32 %32, %22
%34 = trunc i64 %31 to i32
%35 = icmp sgt i32 %33, %34
br i1 %35, label %25, label %36
36: ; preds = %25, %20
%37 = add nuw i64 %21, 1
%38 = trunc i64 %37 to i32
%39 = call i32 @putchar(i32 10)
%40 = load i32, i32* %2
%41 = add nsw i32 %40, %38
%42 = call i32 @strlen(i8* %10)
%43 = icmp sgt i32 %41, %42
br i1 %43, label %44, label %20
44: ; preds = %36, %17, %11
%45 = add nuw nsw i32 %12, 1
%46 = load i32, i32* %1
%47 = icmp slt i32 %45, %46
br i1 %47, label %11, label %48
48: ; preds = %44, %0
ret i32 0
}