#include <iostream>
#include <string>
#include <cctype>
#include <algorithm>
#include <map>
using namespace std;
int main () {
map<string,int> m;
m["zero"] = 0;
m["one"] = 1;
m["two"] = 2;
m["three"] = 3;
m["four"] = 4;
m["five"] = 5;
m["six"] = 6;
m["seven"] = 7;
m["eight"] = 8;
m["nine"] = 9;
cout << "Enter number from 0-9 with word:" << endl;
string input;
getline(cin, input);
transform(input.begin(), input.end(), input.begin(), ::tolower);
for (int i = 1; i <= m[input]; i++) {
for (int j = 1; j <= i; j++) {
cout << input << ", ";
}
cout << endl;
}
cin.get();
return EXIT_SUCCESS;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8Y2N0eXBlPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8bWFwPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluICgpIHsKICAgIG1hcDxzdHJpbmcsaW50PiBtOwogICAgbVsiemVybyJdID0gMDsKICAgIG1bIm9uZSJdID0gMTsKICAgIG1bInR3byJdID0gMjsKICAgIG1bInRocmVlIl0gPSAzOwogICAgbVsiZm91ciJdID0gNDsKICAgIG1bImZpdmUiXSA9IDU7CiAgICBtWyJzaXgiXSA9IDY7CiAgICBtWyJzZXZlbiJdID0gNzsKICAgIG1bImVpZ2h0Il0gPSA4OwogICAgbVsibmluZSJdID0gOTsKCiAgICBjb3V0IDw8ICJFbnRlciBudW1iZXIgZnJvbSAwLTkgd2l0aCB3b3JkOiIgPDwgZW5kbDsKICAgIHN0cmluZyBpbnB1dDsKICAgIGdldGxpbmUoY2luLCBpbnB1dCk7CiAgICB0cmFuc2Zvcm0oaW5wdXQuYmVnaW4oKSwgaW5wdXQuZW5kKCksIGlucHV0LmJlZ2luKCksIDo6dG9sb3dlcik7CgogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gbVtpbnB1dF07IGkrKykgewogICAgICAgIGZvciAoaW50IGogPSAxOyBqIDw9IGk7IGorKykgewogICAgICAgICAgICBjb3V0IDw8IGlucHV0IDw8ICIsICI7CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgZW5kbDsKICAgIH0KCiAgICBjaW4uZ2V0KCk7CiAgICByZXR1cm4gRVhJVF9TVUNDRVNTOwp9