#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;
}