#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; struct ST { int l,u,r,d; }; bool operator<(const ST& a, const ST& b){ return a.d > b.d; } int main(){ int N, xLB, xRB; cin >> N >> xLB >> xRB; vector v; rep(i,N){ int l, u, r, d; cin >> l >> u >> r >> d; v.push_back((ST){l,u,r,d}); } sort(ALLOF(v)); vector ret(N, 0); vector field(2000, -1); rep(i,v.size()){ int l = v[i].l; int r = v[i].r; REP(x,l,r+1){ if(x<1 || 1280