#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <algorithm>
#include <cmath>
#include <map>
#include <iomanip>
#include <queue>
#include <unordered_map>
using namespace std;
using ll = long long;

vector<vector<ll>> gr;

void solve() {
	ll n, m, g;
	cin >> n >> m >> g;
	gr.resize(n);
	for (ll i = 0; i < m; ++i) {
		ll a, b;
		cin >> a >> b;
		--a;--b;
		gr[a].push_back(a);
	}
	cout << 0 << endl << 0 << endl;
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false); cin.tie(0);
	ll t = 1;
	// cin >> t;
	while (t--)
		solve();
}