#include <iostream>
#include <iomanip>
#include <thread>
#include <chrono>

using namespace std;

void example1(){ for(int i = 0; i < 10; ++i) { cout << 1; this_thread::sleep_for(100ms);} }
void example2(){ for(int i = 0; i < 10; ++i) { cout << 2; this_thread::sleep_for(100ms);} }
void start_threads()
{

    thread t1(example1);
    thread t2(example2);

    t1.join();
    t2.join();

    cout << endl;
}

int main(int argc, const char * argv[])
{
    start_threads();
    cout << "Once more...\n";
    start_threads();
}
