#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, char **);
int strlen(char *);
int main() {
  char line[100];
  int len, i;
  while (scanf("%s", &line) != EOF) {
    len = strlen(line) - 8;
    printf("%c", line[0]);
    for (i = 0; i < len; i++)
      printf(" ");
    printf("%c", line[strlen(line) - 1]);
    printf("\n");
    printf("%c", line[1]);
    for (i = 0; i < len; i++)
      printf(" ");
    printf("%c", line[strlen(line) - 2]);
    printf("\n");
    printf("%c", line[2]);
    for (i = 0; i < len; i++)
      printf(" ");
    printf("%c", line[strlen(line) - 3]);
    printf("\n");
    for (i = 3; i < strlen(line) - 3; i++)
      printf("%c", line[i]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2e8f(%rip),%rcx
cmp    (%rcx),%rax
je     131f <main+0x1ef>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x8,%eax
mov    %eax,-0x74(%rbp)
movsbl -0x70(%rbp),%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    11b2 <main+0x82>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    118a <main+0x5a>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x6f(%rbp),%esi
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1222 <main+0xf2>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11fa <main+0xca>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x2,%eax
cltq
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsbl -0x6e(%rbp),%esi
lea    0xda7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1292 <main+0x162>
lea    0xd89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    126a <main+0x13a>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x3,%eax
cltq
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x7c(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x7c(%rbp),%eax
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    130c <main+0x1dc>
movslq -0x78(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%esi
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    12c8 <main+0x198>
lea    0xcf5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xebb(%rip),%rdi
mov    %rsp,%r13
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    0x2e91(%rip),%r12
cmp    (%r12),%rax
jne    116e <main+0x3e>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe8b(%rip),%r14
jmp    119b <main+0x6b>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
cmp    (%r12),%rax
je     115d <main+0x2d>
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    %eax,%r15d
lea    -0x8(%r15),%ebx
movsbl (%rsp),%edi
call   1030 <putchar@plt>
cmp    $0x9,%r15d
jl     11cf <main+0x9f>
mov    %ebx,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0x90>
mov    %r13,%rdi
call   1040 <strlen@plt>
cltq
movsbl -0x1(%rax,%r13,1),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x1(%rsp),%edi
call   1030 <putchar@plt>
cmp    $0x9,%r15d
jl     120f <main+0xdf>
mov    %ebx,%ebp
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1200 <main+0xd0>
mov    %r13,%rdi
call   1040 <strlen@plt>
cltq
movsbl -0x2(%rax,%r13,1),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x2(%rsp),%edi
call   1030 <putchar@plt>
cmp    $0x9,%r15d
jl     124f <main+0x11f>
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1240 <main+0x110>
mov    %r13,%rdi
call   1040 <strlen@plt>
cltq
movsbl -0x3(%rax,%r13,1),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
cmp    $0x7,%eax
jl     1180 <main+0x50>
mov    $0x3,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rsp,%rbp,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
mov    %r13,%rdi
call   1040 <strlen@plt>
add    $0xfffffffd,%eax
cltq
cmp    %rax,%rbp
jl     1290 <main+0x160>
jmp    1180 <main+0x50>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %99, %0
%6 = bitcast [100 x i8]* %2 to i8**
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %6)
%8 = load i64, i64* @EOF
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %101
10: ; preds = %5
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = sub nsw i32 %12, 8
store i32 %13, i32* %3
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
store i32 0, i32* %4
br label %18
18: ; preds = %24, %10
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %18
27: ; preds = %18
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%29 = call i32 @strlen(i8* %28)
%30 = sub nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 1
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %39)
store i32 0, i32* %4
br label %41
41: ; preds = %47, %27
%42 = load i32, i32* %4
%43 = load i32, i32* %3
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %50
45: ; preds = %41
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %47
47: ; preds = %45
%48 = load i32, i32* %4
%49 = add nsw i32 %48, 1
store i32 %49, i32* %4
br label %41
50: ; preds = %41
%51 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%52 = call i32 @strlen(i8* %51)
%53 = sub nsw i32 %52, 2
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %54
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %57)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%60 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 2
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %62)
store i32 0, i32* %4
br label %64
64: ; preds = %70, %50
%65 = load i32, i32* %4
%66 = load i32, i32* %3
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %73
68: ; preds = %64
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %70
70: ; preds = %68
%71 = load i32, i32* %4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %4
br label %64
73: ; preds = %64
%74 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%75 = call i32 @strlen(i8* %74)
%76 = sub nsw i32 %75, 3
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %77
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %80)
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 3, i32* %4
br label %83
83: ; preds = %96, %73
%84 = load i32, i32* %4
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%86 = call i32 @strlen(i8* %85)
%87 = sub nsw i32 %86, 3
%88 = icmp slt i32 %84, %87
br i1 %88, label %89, label %99
89: ; preds = %83
%90 = load i32, i32* %4
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %94)
br label %96
96: ; preds = %89
%97 = load i32, i32* %4
%98 = add nsw i32 %97, 1
store i32 %98, i32* %4
br label %83
99: ; preds = %83
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %5
101: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = bitcast [100 x i8]* %1 to i8**
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%5 = load i64, i64* @EOF
%6 = icmp eq i64 %4, %5
br i1 %6, label %83, label %7
7: ; preds = %0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 1
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 2
br label %10
10: ; preds = %7, %78
%11 = call i32 @strlen(i8* %2)
%12 = add i32 %11, -8
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 @putchar(i32 %14)
%16 = icmp sgt i32 %11, 8
br i1 %16, label %17, label %22
17: ; preds = %10, %17
%18 = phi i32 [ %20, %17 ], [ 0, %10 ]
%19 = call i32 @putchar(i32 32)
%20 = add nuw nsw i32 %18, 1
%21 = icmp eq i32 %20, %12
br i1 %21, label %22, label %17
22: ; preds = %17, %10
%23 = call i32 @strlen(i8* %2)
%24 = add nsw i32 %23, -1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = call i32 @putchar(i32 %28)
%30 = call i32 @putchar(i32 10)
%31 = load i8, i8* %8
%32 = sext i8 %31 to i32
%33 = call i32 @putchar(i32 %32)
br i1 %16, label %34, label %39
34: ; preds = %22, %34
%35 = phi i32 [ %37, %34 ], [ 0, %22 ]
%36 = call i32 @putchar(i32 32)
%37 = add nuw nsw i32 %35, 1
%38 = icmp eq i32 %37, %12
br i1 %38, label %39, label %34
39: ; preds = %34, %22
%40 = call i32 @strlen(i8* %2)
%41 = add nsw i32 %40, -2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = call i32 @putchar(i32 %45)
%47 = call i32 @putchar(i32 10)
%48 = load i8, i8* %9
%49 = sext i8 %48 to i32
%50 = call i32 @putchar(i32 %49)
br i1 %16, label %51, label %56
51: ; preds = %39, %51
%52 = phi i32 [ %54, %51 ], [ 0, %39 ]
%53 = call i32 @putchar(i32 32)
%54 = add nuw nsw i32 %52, 1
%55 = icmp eq i32 %54, %12
br i1 %55, label %56, label %51
56: ; preds = %51, %39
%57 = call i32 @strlen(i8* %2)
%58 = add nsw i32 %57, -3
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = call i32 @putchar(i32 %62)
%64 = call i32 @putchar(i32 10)
%65 = call i32 @strlen(i8* %2)
%66 = icmp sgt i32 %65, 6
br i1 %66, label %67, label %78
67: ; preds = %56, %67
%68 = phi i64 [ %73, %67 ], [ 3, %56 ]
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 @putchar(i32 %71)
%73 = add nuw nsw i64 %68, 1
%74 = call i32 @strlen(i8* %2)
%75 = add nsw i32 %74, -3
%76 = sext i32 %75 to i64
%77 = icmp slt i64 %73, %76
br i1 %77, label %67, label %78
78: ; preds = %67, %56
%79 = call i32 @putchar(i32 10)
%80 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3)
%81 = load i64, i64* @EOF
%82 = icmp eq i64 %80, %81
br i1 %82, label %83, label %10
83: ; preds = %78, %0
ret i32 0
}