#include <bits/stdc++.h>

using namespace std;


int main()
{
    int n, m, g;
    cin >> n >> m >> g;
    vector<vector<int>> A(n, vector<int>());
    vector<vector<int>> B(n, vector<int>());
    int a, b;
    for (int i = 0; i < m; ++i) {
        cin >> a >> b;
        --a;
        --b;
        A[a].push_back(b);
        B[b].push_back(a);
    }
    cout << 1 << endl;
    cout << 1 << endl;
    
    return 0;
}
