#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 len_ret(char *);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char character[100];
  int s;
  scanf("%s", character);
  s = len_ret(character);
  if ((s % 2) == 0) {
    for (int k = 0; k < s / 2; k++) {
      printf("%c", character[(s / 2) + k]);
    }
    for (int j = 0; j < s / 2; j++) {
      printf("%c", character[j]);
    }
  } else if ((s % 2) != 0) {
    for (int m = 0; m < (s - 1) / 2; m++) {
      printf("%c", character[((s + 1) / 2) + m]);
    }
    printf("%c", character[(s - 1) / 2]);
    for (int n = 0; n < (s - 1) / 2; n++) {
      printf("%c", character[n]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <len_ret@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    121f <main+0xef>
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x88(%rbp),%eax
cmp    %ecx,%eax
jge    11cc <main+0x9c>
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x78(%rbp),%eax
cltq
lea    0xe4f(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1179 <main+0x49>
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8c(%rbp),%eax
cmp    %ecx,%eax
jge    121a <main+0xea>
movslq -0x7c(%rbp),%rax
lea    0xe01(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11d3 <main+0xa3>
jmp    131e <main+0x1ee>
mov    -0x74(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1319 <main+0x1e9>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
cmp    %ecx,%eax
jge    1293 <main+0x163>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x80(%rbp),%eax
cltq
lea    0xd88(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    123a <main+0x10a>
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
lea    0xd59(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
call   1030 <printf@plt>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
cmp    %ecx,%eax
jge    1314 <main+0x1e4>
movslq -0x84(%rbp),%rax
lea    0xd0d(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12be <main+0x18e>
jmp    1319 <main+0x1e9>
jmp    131e <main+0x1ee>
xor    %eax,%eax
add    $0xa0,%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,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <len_ret@plt>
mov    %eax,%r14d
test   $0x1,%r14b
jne    11da <main+0xaa>
cmp    $0x2,%r14d
jl     129a <main+0x16a>
mov    %r14d,%eax
shr    $0x1f,%eax
add    %r14d,%eax
sar    %eax
cltq
mov    %eax,%r12d
lea    (%rsp,%rax,1),%rbx
xor    %ebp,%ebp
lea    0xe7b(%rip),%r15
nopl   0x0(%rax,%rax,1)
movsbl (%rbx,%rbp,1),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1190 <main+0x60>
cmp    $0x2,%r14d
jl     129a <main+0x16a>
xor    %ebp,%ebp
lea    0xe4b(%rip),%rbx
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbp,1),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11c0 <main+0x90>
jmp    129a <main+0x16a>
lea    -0x1(%r14),%eax
shr    $0x1f,%eax
lea    (%r14,%rax,1),%r15d
add    $0xffffffff,%r15d
sar    %r15d
cmp    $0x2,%r14d
jle    1287 <main+0x157>
lea    0x1(%r14),%eax
shr    %rax
cmp    $0x2,%r15d
mov    $0x1,%r13d
cmovge %r15d,%r13d
lea    (%rsp,%rax,1),%rbx
xor    %ebp,%ebp
lea    0xdeb(%rip),%r12
nopl   0x0(%rax,%rax,1)
movsbl (%rbx,%rbp,1),%esi
mov    %r12,%rdi
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1220 <main+0xf0>
movslq %r15d,%rax
movsbl (%rsp,%rax,1),%esi
lea    0xdc0(%rip),%rdi
call   1030 <printf@plt>
cmp    $0x3,%r14d
jl     129a <main+0x16a>
cmp    $0x2,%r15d
mov    $0x1,%ebp
cmovge %r15d,%ebp
xor    %ebx,%ebx
lea    0xd9f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1270 <main+0x140>
jmp    129a <main+0x16a>
movslq %r15d,%rax
movsbl (%rsp,%rax,1),%esi
lea    0xd6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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