// 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, M, K;
    cin >> N >> M >> K;

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

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


    // insert your code here


    cout << 42 << endl; // print the result
    
    return 0;
}
