#include using namespace std; using ll = long long; using vll = vector; #define sz(x) ((ll)(x).size()) #define For(i, a, n) for(int i = a;i ostream& operator<<(ostream &os, const vector &cont) { for (auto it = cont.begin(); it != cont.end(); ++it) os << (it == cont.begin() ? "" : " ") << *it; return os; } int main() { int n, m, c;cin>>n>>m>>c; vll free(m, c); int f=0,s=0; For(i, 0, n){ int a, b;cin>>a>>b; --a,--b; if(free[a]>0){ free[a]--; f++; } else if(free[b]>0){ free[b]--; s++; } } cout<