#include<bits/stdc++.h>
using ll = long long;
using d = double;
using ld = long double;
using ull = unsigned long long;
using namespace std;
#define all(x) x.begin(), x.end()
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
const int maxn = 3e5 + 2;
const ll INF = 1e9 + 7;
int solve() {
    int n, m, g;
    cin >> n >> m >> g;
    vector<vector<int>> graph(n);
    for (int i = 0; i < m; ++i) {
        int u, v;
        cin >> u >> v;
        u--, v--;
        graph[u].push_back(v);
    }
    cout << 0 << '\n';
    cout << 0 << '\n';
    return 0;
}
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
