#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);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a[1000] = "";
  int i, tosave = 0, b[25] = {0}, skip;
  scanf("%999[^\r\n]", a);
  for (i = 0; i < 999; i++) {
    skip = 0;
    if (a[i] <= 'Z' && a[i] >= 'A') {
      tosave = a[i] - 'A';
    } else if (a[i] <= 'z' && a[i] >= 'a') {
      tosave = a[i] - 'a';
    } else {
      skip = 1;
    }
    if (skip == 0) {
      b[tosave]++;
    }
  }
  for (i = 0; i < 25; i++) {
    if (b[i] > 0) {
      printf("%c - %d\n", 'a' + i, b[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1040 <memset@plt>
movl   $0x0,-0x3f8(%rbp)
lea    -0x460(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1050 <scanf@plt>
movl   $0x0,-0x3f4(%rbp)
cmpl   $0x3e7,-0x3f4(%rbp)
jge    1290 <main+0x160>
movl   $0x0,-0x464(%rbp)
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
cmp    $0x5a,%eax
jg     11f6 <main+0xc6>
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
cmp    $0x41,%eax
jl     11f6 <main+0xc6>
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
sub    $0x41,%eax
mov    %eax,-0x3f8(%rbp)
jmp    1252 <main+0x122>
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     1243 <main+0x113>
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
jl     1243 <main+0x113>
movslq -0x3f4(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
sub    $0x61,%eax
mov    %eax,-0x3f8(%rbp)
jmp    124d <main+0x11d>
movl   $0x1,-0x464(%rbp)
jmp    1252 <main+0x122>
cmpl   $0x0,-0x464(%rbp)
jne    1277 <main+0x147>
movslq -0x3f8(%rbp),%rax
mov    -0x460(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x460(%rbp,%rax,4)
jmp    127c <main+0x14c>
mov    -0x3f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3f4(%rbp)
jmp    118f <main+0x5f>
movl   $0x0,-0x3f4(%rbp)
cmpl   $0x19,-0x3f4(%rbp)
jge    12fb <main+0x1cb>
movslq -0x3f4(%rbp),%rax
cmpl   $0x0,-0x460(%rbp,%rax,4)
jle    12e2 <main+0x1b2>
mov    -0x3f4(%rbp),%eax
add    $0x61,%eax
movslq -0x3f4(%rbp),%rcx
mov    -0x460(%rbp,%rcx,4),%edx
lea    0xd30(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
jmp    12e7 <main+0x1b7>
mov    -0x3f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3f4(%rbp)
jmp    129a <main+0x16a>
xor    %eax,%eax
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x460,%rsp
mov    $0xffffff9f,%r15d
lea    0x70(%rsp),%r14
xor    %ebx,%ebx
mov    $0x3e8,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe79(%rip),%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x20(%r15),%rax
jmp    11b3 <main+0x83>
cs nopw 0x0(%rax,%rax,1)
nop
add    %ecx,%edx
addl   $0x1,(%rsp,%rdx,4)
add    $0x1,%rbx
cmp    $0x3e7,%rbx
je     11d5 <main+0xa5>
movsbq 0x70(%rsp,%rbx,1),%rcx
lea    -0x41(%rcx),%esi
mov    %rax,%rdx
cmp    $0x1a,%sil
jb     11a0 <main+0x70>
lea    -0x61(%rcx),%esi
mov    $0xffffff9f,%edx
cmp    $0x19,%sil
jbe    11a0 <main+0x70>
jmp    11a6 <main+0x76>
xor    %ebx,%ebx
lea    0xe2c(%rip),%r14
jmp    11ea <main+0xba>
add    $0x1,%rbx
cmp    $0x19,%rbx
je     1201 <main+0xd1>
mov    (%rsp,%rbx,4),%edx
test   %edx,%edx
jle    11e0 <main+0xb0>
lea    0x61(%rbx),%eax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    11e0 <main+0xb0>
xor    %eax,%eax
add    $0x460,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%999[^\0D\0A]\00"
@.str.1 = [9 x i8] c"%c - %d\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [25 x i32]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = bitcast [25 x i32]* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
br label %6
6: ; preds = %0, %23
%7 = phi i64 [ 0, %0 ], [ %24, %23 ]
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i64
%11 = add i8 %9, -65
%12 = icmp ult i8 %11, 26
br i1 %12, label %16, label %13
13: ; preds = %6
%14 = add i8 %9, -97
%15 = icmp ult i8 %14, 26
br i1 %15, label %16, label %23
16: ; preds = %13, %6
%17 = phi i64 [ 4294967231, %6 ], [ 4294967199, %13 ]
%18 = add nsw i64 %17, %10
%19 = and i64 %18, 4294967295
%20 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %20
br label %23
23: ; preds = %13, %16
%24 = add nuw nsw i64 %7, 1
%25 = icmp eq i64 %24, 999
br i1 %25, label %26, label %6
26: ; preds = %23, %35
%27 = phi i64 [ %36, %35 ], [ 0, %23 ]
%28 = getelementptr inbounds [25 x i32], [25 x i32]* %2, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %26
%32 = trunc i64 %27 to i8
%33 = add nuw nsw i8 %32, 97
%34 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8 signext %33, i32 %29)
br label %35
35: ; preds = %26, %31
%36 = add nuw nsw i64 %27, 1
%37 = icmp eq i64 %36, 25
br i1 %37, label %38, label %26
38: ; preds = %35
ret i32 0
}