// NOTE: it is recommended to use this even if you don't understand the following code.

#include <iostream>
#include <fstream>
#include <vector>

using namespace std;

int main() {
//  uncomment the following lines if you want to read/write from files
//  ifstream cin("input.txt");
//  ofstream cout("output.txt");

    int N, K;
    cin >> N >> K;

    vector<int> P(N);
    for (int i = 0; i < N; i++) {
        cin >> P[i];
    }

    vector<int> L(K);
    for (int i = 0; i < K; i++) {
		cin >> L[i];
    }


    // insert your code here

	for(int i = 0; i < N; i++) {
		cout << P[i] << ' ';
	}
    cout << endl;

    return 0;
}
