#include
using namespace std;
int main()
{
int digits = 0;
int alphabets = 0;
int spaces = 0;
int other = 0;
char ch;
cin>>ch;
while(ch!=’$’)
{
if(ch>='0’and ch<= ‘9’)
{
digits++;
}
else if( (ch >='a’and ch <=‘z’) or ( ch>=‘A’ and ch<=‘Z’))
{
alphabets++;
}
else if (ch==’ ’ or ch ==’\n’ or ch==’\t’)
{
spaces++;
}
else
{
other++;
}
cin>>ch;
}
cout<<“digits=”<<digits<<endl;
cout<<“alphabets=”<<alphabets<<endl;
cout<<“spaces =”<<spaces<<endl;
cout<<“Other =”<<other<<endl;
return 0;
}