let line=readline().split('');
let letter=0;
let space=0;
let num=0;
let other=0;
line.map(item=>{
if(/[a-zA-Z]/.test(item)){
letter++
}else if(/\s/.test(item)){
space++
}else if(/[0-9]/.test(item)){
num++
}else{
other++
}
})
console.log(letter)
console.log(space)
console.log(num)
console.log(other)