#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 *, char *);
int strlen(char *);
int main() {
  char word[100];
  int i = 0;
  int hashtable[26];
  int k = 0;
  scanf("%s", word);
  int length = strlen(word);
  char word1[length];
  for (i = 0; i < 26; i++)
    hashtable[i] = 0;
  for (i = 0; i < length; i++) {
    int temp = ((int)word[i] - 97);
    hashtable[temp]++;
    if (hashtable[temp] < 2) {
      word1[k] = word[i];
      k++;
    }
  }
  word1[k] = '\0';
  printf("%s\n", word1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0xe4(%rbp)
lea    0xea6(%rip),%rdi
lea    -0x70(%rbp),%rsi
mov    %rsi,-0x110(%rbp)
call   1050 <scanf@plt>
mov    -0x110(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x108(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xf8(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x1a,-0x74(%rbp)
jge    11dc <main+0xac>
movslq -0x74(%rbp),%rax
movl   $0x0,-0xe0(%rbp,%rax,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11b5 <main+0x85>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0xe8(%rbp),%eax
jge    126c <main+0x13c>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
sub    $0x61,%eax
mov    %eax,-0xfc(%rbp)
movslq -0xfc(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xe0(%rbp,%rax,4)
movslq -0xfc(%rbp),%rax
cmpl   $0x2,-0xe0(%rbp,%rax,4)
02
jge    1259 <main+0x129>
mov    -0x108(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    -0x70(%rbp,%rcx,1),%dl
movslq -0xe4(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    125e <main+0x12e>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11e3 <main+0xb3>
mov    -0x108(%rbp),%rsi
movslq -0xe4(%rbp),%rax
movb   $0x0,(%rsi,%rax,1)
lea    0xd7e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xe0,%rsp
lea    0xebb(%rip),%rdi
lea    -0xf0(%rbp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rsp,%r14
mov    %eax,%r8d
mov    %rsp,%rsi
lea    0xf(%r8),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%rsi
mov    %rsi,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,-0x30(%rbp)
movaps %xmm0,-0x40(%rbp)
movaps %xmm0,-0x50(%rbp)
movaps %xmm0,-0x60(%rbp)
movaps %xmm0,-0x70(%rbp)
movaps %xmm0,-0x80(%rbp)
movq   $0x0,-0x20(%rbp)
test   %eax,%eax
jle    11d2 <main+0xa2>
xor    %edx,%edx
xor    %eax,%eax
jmp    11a9 <main+0x79>
add    $0x1,%rdx
cmp    %rdx,%r8
je     11d4 <main+0xa4>
movsbq -0xf0(%rbp,%rdx,1),%rdi
ff ff
mov    -0x204(%rbp,%rdi,4),%ebx
lea    0x1(%rbx),%ecx
mov    %ecx,-0x204(%rbp,%rdi,4)
test   %ebx,%ebx
jg     11a0 <main+0x70>
cltq
mov    %dil,(%rsi,%rax,1)
add    $0x1,%eax
jmp    11a0 <main+0x70>
xor    %eax,%eax
cltq
movb   $0x0,(%rsi,%rax,1)
lea    0xe22(%rip),%rdi
call   1040 <printf@plt>
mov    %r14,%rsp
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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