#include <iostream>
#include <list>
#include <string>
using namespace std;
ostream &operator << (ostream &oss, list<string> &lst) {
for (auto &w : lst) {
oss << w << endl;
}
return oss;
}
int main() {
string words;
list<string> LolWords;
cout << "Enter any words in the order you would like"
<< endl << "them displayed" << endl;
cout << endl << "Enter 1 to quit" << endl << endl;
while (getline(cin, words) && words[0] != '1')
LolWords.push_back(words);
cout << LolWords << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGlzdD4KI2luY2x1ZGUgPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCm9zdHJlYW0gJm9wZXJhdG9yIDw8IChvc3RyZWFtICZvc3MsIGxpc3Q8c3RyaW5nPiAmbHN0KSB7Cglmb3IgKGF1dG8gJncgOiBsc3QpIHsKCQlvc3MgPDwgdyA8PCBlbmRsOwoJfQoJcmV0dXJuIG9zczsKfQoKaW50IG1haW4oKSB7CglzdHJpbmcgd29yZHM7CglsaXN0PHN0cmluZz4gTG9sV29yZHM7Cgljb3V0IDw8ICJFbnRlciBhbnkgd29yZHMgaW4gdGhlIG9yZGVyIHlvdSB3b3VsZCBsaWtlIgoJCSA8PCBlbmRsIDw8ICJ0aGVtIGRpc3BsYXllZCIgPDwgZW5kbDsKCWNvdXQgPDwgZW5kbCA8PCAiRW50ZXIgMSB0byBxdWl0IiA8PCBlbmRsIDw8IGVuZGw7CgkKCXdoaWxlIChnZXRsaW5lKGNpbiwgd29yZHMpICYmIHdvcmRzWzBdICE9ICcxJykKCQlMb2xXb3Jkcy5wdXNoX2JhY2sod29yZHMpOwoJCgljb3V0IDw8IExvbFdvcmRzIDw8IGVuZGw7CglyZXR1cm4gMDsKfQ==