#include <iostream>
#include <list>
#include <vector>
#include <string>
 
// This example shows how easy lists can be filled
// and emptied again.


int main(int argc, char *argv[]) {
 std::list<std::string> l;      
 std::vector<std::string> v;

 v.push_back("first");
 v.push_back("second");
 v.push_back("third");

 // List elements are added to the end 
 for ( int i = 0; i < 10 ; ++i ) {
  l.push_back( v[ i % 3 ] );
 }
	
 // first list element ist printed 
 // and the delete from the list
 while (! l.empty()) {
   std::cout << l.front() << '\n';
   l.pop_front();
 }

 return 0;
}
