#include <stdio.h>

char check_char();

main()
{
	unsigned char ans;

	while((ans=getch())<256)
	{
		printf("%c  %d  %c\n",ans,ans,check_char(ans));
	}
}


/***********************************************************************
**
**	returns:
**
**		l -- lower case letter
**		L -- upper case letter
**		n -- number
**		p -- punctuation
**		w -- white space
**		i -- illegal
**
************************************************************************/

char check_char(c)

char c;

{
	if(c<0x9)
		return('i');
	if(c<0xe)
		return('w');
	if(c<0x1f)
		return('i');
	if(c==0x20)
		return('w');
	if(c<0x2f)
		return('p');
	if(c<0x3a)
		return('n');
	if(c<0x41)
		return('p');
	if(c<0x5b)
		return('L');
	if(c<0x61)
		return('p');
	if(c<0x7b)
		return('l');
	if(c<0x7e)
		return('p');
	else
		return('i');

}
                               