#include <iostream>
#include <string>
using namespace std;

int main() {
	string word;

	cout << "Type a text:" << endl;

	if (cin >> word) {
		size_t count_words = 1;
		string longest_word = word, shortest_word = word;

	    while (cin >> word) {
    	    ++count_words;
        	if (word.size() > longest_word.size())
	            longest_word = word;
    	    if (word.size() < shortest_word.size())
        	    shortest_word = word;
    	}

	    cout << "The text contains " << count_words << " word(s)." << endl;
    	cout << "The shortest word is " << shortest_word << "." << endl;
	    cout << "It has " << shortest_word.size() << " character(s)." << endl;
    	cout << "The longest word is " << longest_word << "." << endl;
	    cout << "It has " << longest_word.size() << " character(s)." << endl;
	}
	else {
    	cout << "No text was entered." << endl;
	}

	return 0;
}