#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 *, char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int strl(char *);
int main() {
  char str[100];
  int i;
  scanf("%s", str);
  int n = strl(str);
  char str1[50], str2[50];
  if (n % 2 == 0) {
    for (i = 0; i < n / 2; i++) {
      str1[i] = str[i];
    }
    for (i = 0; i < n / 2; i++) {
      str2[i] = str[n / 2 + n % 2 + i];
    }
  } else {
    for (i = 0; i < n / 2; i++) {
      str1[i] = str[i];
    }
    for (i = 0; i <= n / 2; i++) {
      str2[i] = str[n / 2 + 1 + i];
    }
  }
  printf("%s%s", str2, str1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strl@plt>
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1234 <main+0x104>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0xf4(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xf4(%rbp),%eax
cmp    %ecx,%eax
jge    11be <main+0x8e>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
movslq -0x74(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1179 <main+0x49>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xf8(%rbp),%eax
cmp    %ecx,%eax
jge    122f <main+0xff>
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xfc(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xfc(%rbp),%eax
add    %edx,%eax
add    -0x74(%rbp),%eax
cltq
mov    -0x70(%rbp,%rax,1),%cl
movslq -0x74(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11c5 <main+0x95>
jmp    12e0 <main+0x1b0>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x100(%rbp),%eax
cmp    %ecx,%eax
jge    1280 <main+0x150>
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
movslq -0x74(%rbp),%rax
mov    %cl,-0xb0(%rbp,%rax,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    123b <main+0x10b>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x104(%rbp)
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x104(%rbp),%eax
cmp    %ecx,%eax
jg     12db <main+0x1ab>
mov    -0x78(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
add    -0x74(%rbp),%eax
cltq
mov    -0x70(%rbp,%rax,1),%cl
movslq -0x74(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1287 <main+0x157>
jmp    12e0 <main+0x1b0>
lea    -0xf0(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
lea    0xd0b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xe8,%rsp
lea    0xeb1(%rip),%rdi
lea    0x80(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strl@plt>
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
test   $0x1,%al
jne    1195 <main+0x55>
cmp    $0x2,%eax
jl     11df <main+0x9f>
lea    -0x1(%rbx),%r14d
lea    0x1(%r14),%rdx
mov    %rsp,%rdi
lea    0x80(%rsp),%rsi
call   1050 <memcpy@plt>
jmp    11c0 <main+0x80>
cmp    $0x2,%eax
jl     11b3 <main+0x73>
lea    -0x1(%rbx),%edx
add    $0x1,%rdx
mov    %rsp,%rdi
lea    0x80(%rsp),%rsi
call   1050 <memcpy@plt>
jmp    11b8 <main+0x78>
cmp    $0xffffffff,%eax
jl     11df <main+0x9f>
mov    %ebx,%r14d
lea    0x1(%rbx),%eax
mov    %eax,%ebx
movslq %ebx,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x80,%rsi
mov    %r14d,%edx
add    $0x1,%rdx
lea    0x40(%rsp),%rdi
call   1050 <memcpy@plt>
lea    0xe1a(%rip),%rdi
lea    0x40(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %r14
ret

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

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