#include <thread>
#include <iostream>
using namespace std;

void print1() {
    for (int i = 0; i < 10; ++i) {
        this_thread::sleep_for(chrono::milliseconds(10));
        cout << "print1" << endl;
    }
}

void print2() {
    for (int i = 0; i < 10; ++i) {
        this_thread::sleep_for(chrono::milliseconds(20));
        cout << "print2" << endl;
    }
}

int main() { 
    thread t1(&print1); 
    thread t2(&print2); 
    t1.join();
    t2.join();
    cin.get();
    return 0; 
}
