#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ putchar(char);
scalar_t__ scanf(char *, char *);
int main() {
  char A[201];
  char B[26] = {0};
  int i;
  while (scanf("%s", A) != EOF) {
    for (i = 0; A[i] != '\0'; i++)
      B[A[i] - 'a']++;
    for (i = 0; i < 26; i++) {
      while (B[i]) {
        printf("%c", 'a' + i);
        B[i]--;
      }
    }
    putchar('\n');
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1a,%edx
call   1050 <memset@plt>
lea    -0xd0(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1060 <scanf@plt>
mov    0x2e59(%rip),%rcx
cmp    (%rcx),%rax
je     1281 <main+0x131>
movl   $0x0,-0xf4(%rbp)
movslq -0xf4(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11f3 <main+0xa3>
movslq -0xf4(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
sub    $0x61,%eax
cltq
mov    -0xf0(%rbp,%rax,1),%cl
add    $0x1,%cl
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    11a2 <main+0x52>
movl   $0x0,-0xf4(%rbp)
cmpl   $0x1a,-0xf4(%rbp)
jge    1272 <main+0x122>
jmp    120f <main+0xbf>
movslq -0xf4(%rbp),%rax
cmpb   $0x0,-0xf0(%rbp,%rax,1)
je     1259 <main+0x109>
mov    -0xf4(%rbp),%eax
add    $0x61,%eax
lea    0xdcf(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
movslq -0xf4(%rbp),%rax
mov    -0xf0(%rbp,%rax,1),%cl
add    $0xff,%cl
mov    %cl,-0xf0(%rbp,%rax,1)
jmp    120f <main+0xbf>
jmp    125e <main+0x10e>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    11fd <main+0xad>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1175 <main+0x25>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0xa(%rsp)
movaps %xmm0,(%rsp)
lea    0xe9c(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e73(%rip),%rcx
cmp    (%rcx),%rax
jne    1181 <main+0x41>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0x20(%rsp),%r15
lea    0xe76(%rip),%rbx
mov    %rsp,%rbp
jmp    11c5 <main+0x85>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe4f(%rip),%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    0x2e28(%rip),%rcx
cmp    (%rcx),%rax
je     117a <main+0x3a>
mov    0x20(%rsp),%al
test   %al,%al
je     11f4 <main+0xb4>
lea    0x21(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbq %al,%rax
addb   $0x1,-0x61(%rax,%rbp,1)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
jne    11e0 <main+0xa0>
xor    %r13d,%r13d
jmp    120f <main+0xcf>
nopl   0x0(%rax)
movb   $0x0,(%rsp,%r13,1)
add    $0x1,%r13
cmp    $0x1a,%r13
je     11a0 <main+0x60>
mov    (%rsp,%r13,1),%r12b
test   %r12b,%r12b
je     1200 <main+0xc0>
lea    0x61(%r13),%r14d
nopl   0x0(%rax)
movsbl %r14b,%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0xff,%r12b
jne    1220 <main+0xe0>
jmp    1200 <main+0xc0>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [201 x i8]
%2 = alloca [26 x i8]
%3 = getelementptr inbounds [201 x i8], [201 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %45, label %8
8: ; preds = %0, %40
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 0
br i1 %10, label %23, label %11
11: ; preds = %8, %11
%12 = phi i64 [ %19, %11 ], [ 0, %8 ]
%13 = phi i8 [ %21, %11 ], [ %9, %8 ]
%14 = sext i8 %13 to i64
%15 = add nsw i64 %14, -97
%16 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = add i8 %17, 1
store i8 %18, i8* %16
%19 = add nuw nsw i64 %12, 1
%20 = getelementptr inbounds [201 x i8], [201 x i8]* %1, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %23, label %11
23: ; preds = %11, %8
br label %24
24: ; preds = %23, %37
%25 = phi i64 [ %38, %37 ], [ 0, %23 ]
%26 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 0
br i1 %28, label %37, label %29
29: ; preds = %24
%30 = trunc i64 %25 to i8
%31 = add i8 %30, 97
br label %32
32: ; preds = %29, %32
%33 = phi i8 [ %27, %29 ], [ %35, %32 ]
%34 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext %31)
%35 = add i8 %33, -1
%36 = icmp eq i8 %35, 0
br i1 %36, label %37, label %32
37: ; preds = %32, %24
store i8 0, i8* %26
%38 = add nuw nsw i64 %25, 1
%39 = icmp eq i64 %38, 26
br i1 %39, label %40, label %24
40: ; preds = %37
%41 = call i32 @putchar(i8 signext 10)
%42 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%43 = load i64, i64* @EOF
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %8
45: ; preds = %40, %0
%46 = call i32 @exit(i32 0)
unreachable
}