#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(int argc, char *argv[])
{
  string line; 
  while(getline(cin, line )) { 
  	cout << line<<" ---> ";
	istringstream is(line);	
	size_t processed;
    string hi;
    double hello;
    is >> hi;
	
	try {
		hello = stod(hi,&processed); 
    	cout<<"number:" <<hello; 
    	if (processed<hi.size()) 
    		cout << " (followed by something)";
        cout <<endl; 
    }
    catch (...) 
    {
        cout <<"string: "<< hi << endl;
    }

  }
  cout << "Done!" << endl;
}
