#include <boost/thread.hpp>
#include <boost/chrono.hpp>
#include <iostream>

using namespace std;
using namespace boost;


//pref to be void 
void mw(int tid) {
	cout <<"Hello from thread[ " << tid << "]" << endl;
//	while(true) {
		this_thread::sleep_for(boost::chrono::milliseconds(500));
//		cout<< "[ " << tid << "]" << endl;
//			}
	
}

int main() {	
	int count = 1;
	//Increasing contention(>???????????????)
	thread_group *tg=new thread_group();
	int n;
	cout << "give n";
	cin >> n;
	for(int i=0; i<n; i++,count++){
		tg->add_thread(new thread(mw,count));
	}
	tg->join_all();
	return 0;
}
