#include <iostream>
#include <vector>
#include <string>
#include <random>

using strvec = std::vector<std::string>;

const strvec article    = { "the", "a", "one", "some", "any" };
const strvec noun       = { "boy", "girl", "dog", "town", "car" };
const strvec verb       = { "drove", "jumped", "ran", "walked", "skipped" };
const strvec preposition= { "to", "from", "over", "on" };

template <typename T>
T random(T min, T max)
{
    static std::mt19937 rng;
    std::uniform_int_distribution<T> dist(min,max);
    return dist(rng);
}

const std::string & get_random(const strvec& v)
{
	return v[random<size_t>(0,v.size()-1)];	
}

int main() 
{
	for(size_t i=0; i< 10; i++)
	{
		std::cout << get_random(article)     << " "
		          << get_random(noun)        << " "
		          << get_random(verb)        << " "
				  << get_random(preposition) << " "
		          << get_random(noun)        << "."
		          << std::endl;
	}
	return 0;
}