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

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

using namespace std;

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

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

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

    vector<int> B(M);
    for (int i = 0; i < M; ++i)
        cin >> B[i];

    vector<int> SX(K - 1), SY(K - 1);


    // INSERT YOUR CODE HERE


    for (int i = 0; i < K - 1; ++i)
        cout << SX[i] << " ";
    cout << endl;

    for (int i = 0; i < K - 1; ++i)
        cout << SY[i] << " ";
    cout << endl;

    return 0;
}
