
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();//以换行为结束
int i, max = 0, min = 0, other = 0;
for(i = 0; i < s.length(); i++)
{
if(s.charAt(i) >= 'A' && s.charAt(i) <= 'Z')//大写字母数
max++;
else if(s.charAt(i) >= 'a' && s.charAt(i) <= 'z')//小写字母数
min++;
else //非英文字母数
other++;
}
System.out.println(max);
System.out.println(min);
System.out.println(other);
}
}


