package main import ( "bufio" "fmt" "os" "unicode" ) func main() { reader := bufio.NewReader(os.Stdin) b, _, _ := reader.ReadLine() str := string(b) var letter, space, number, other int for _, s := range str { if unicode.IsLetter(s) { letter++ continue } if unicode.IsSpace(s) { space++ continue } if unicode.IsNumber(s) { number++ continue } other++ } fmt.Printf("%d\n%d\n%d\n%d", letter, space, number, other) }