#include <iostream>
#include <string>
#include <sstream>

int main()
{
	while(true)
	{
		std::cout << std::endl;

		std::string input;
		if(!std::getline(std::cin, input))
		{
			std::cout << "End of input" << std::endl;
			break;
		}

		bool understood = false;
		
		//Try to read it as a number
		{
			int n;
			if(std::istringstream(input) >> n)
			{
				std::cout << "You entered a number: " << n << std::endl;
				understood = true;
			}
		}
		
		//Try to interpret it as a character
		if(input.length() == 1)
		{
			std::cout << "You entered a character: " << static_cast<int>(input[0]) << std::endl;
			understood = true;
		}

		//Otherwise, just give back what we got
		if(!understood)
		{
			std::cout << "You entered something else: \"" << input << "\"" << std::endl;
		}
	}
}
