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

void print(int delay, const string& msg) {
    for (int i = 0; i < 10; ++i) {
        this_thread::sleep_for(chrono::milliseconds(delay));
        cout << msg << endl;
    }
}

int main() { 
    thread t1(&print, 10, "print1"); 
    thread t2(&print, 20, "print2"); 
    t1.join();
    t2.join();
    cin.get();
    return 0; 
}
