#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 *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n, i, p = 0;
  char ar[100];
  scanf("%d\n", &n);
  for (i = 0; i < n - 1; i++) {
    scanf("%c", &ar[p]);
    if (ar[p] == '\0') {
      break;
    } else
      p++;
  }
  printf("%s", ar);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11af <main+0x8f>
movslq -0x10(%rbp),%rax
lea    -0x80(%rbp),%rsi
add    %rax,%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0x10(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    1193 <main+0x73>
jmp    11af <main+0x8f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a1 <main+0x81>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1152 <main+0x32>
lea    -0x80(%rbp),%rsi
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x2,0xc(%rsp)
jl     1178 <main+0x58>
lea    0xebc(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%rsp,%rbx,1),%rsi
add    $0x10,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpb   $0x0,0x10(%rsp,%rbx,1)
je     1178 <main+0x58>
add    $0x1,%rbx
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    %ebx,%eax
jg     1150 <main+0x30>
lea    0xe88(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %4
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %7
7: ; preds = %28, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 1
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %31
12: ; preds = %7
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %14
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %12
br label %31
24: ; preds = %12
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %27
27: ; preds = %24
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %7
31: ; preds = %23, %7
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %20
8: ; preds = %0, %14
%9 = phi i64 [ %15, %14 ], [ 0, %0 ]
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %9
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %20, label %14
14: ; preds = %8
%15 = add nuw nsw i64 %9, 1
%16 = trunc i64 %15 to i32
%17 = load i32, i32* %1
%18 = add nsw i32 %17, -1
%19 = icmp sgt i32 %18, %16
br i1 %19, label %8, label %20
20: ; preds = %14, %8, %0
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}