#include <stdio.h>
#include <ctype.h>

int main(void) {
    int counts[26] = {0};
    int c;

    printf("Enter text (Press Ctrl+D or Ctrl+Z to end):\n");
    while ((c = getchar()) != EOF) {
        if (isalpha(c)) {
            counts[tolower(c) - 'a']++;
        }
    }

    printf("\nLetter\tOccurrences\n");
    for (int i = 0; i < 26; i++) {
        printf("%c\t%d\n", 'a' + i, counts[i]);
    }
    return 0;
}