#include <string>
#include <iostream>
#include <iomanip>

using namespace std;


int main()
{
    string alphabet;
    cin >> alphabet;

    int wordsCount = 9 + rand()%4;  // Случайное количество слов
    for(int i = 0; i < wordsCount; ++i)
    {
        int wordLength = 5 + rand()%10;  // Случайная длина слова
        string word;
        for(int j = 0; j < wordLength; ++j)
            word += alphabet[rand()%alphabet.length()];
        cout << word << endl;
    }

}
