#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
using namespace std;
#define forn(i,n) for(int i = 1;i <= n;i++)
#define clr(a,b) memset(a,b,sizeof(a))
#define sqr(x) ((x) * (x))
const int N = 110;
const double eps = 1e-6;

double lx[N],ly[N];
bool smk[N],tmk[N];
int lef[N];
double w[N][N];
int n;

bool match(int i){
	smk[i] = true;
	forn(j,n) if(fabs(lx[i] + ly[j] - w[i][j]) < eps && !tmk[j]){
		tmk[j] = true;
		if(!lef[j] || match(lef[j])){
			lef[j] = i;
			return true;
		}
	}
	return false;
}

void update(){
	double a = 1e40;
	forn(i,n) if(smk[i])
		forn(j,n) if(!tmk[j])
		a = min(a,lx[i] + ly[j] - w[i][j]);
	forn(i,n){
		if(smk[i]) lx[i] -= a;
		if(tmk[i]) ly[i] += a;
	}
}

void KM(){
	forn(i,n)
		lef[i] = 0;
	forn(i,n) lx[i] = ly[i] = -1e11;
	forn(i,n) forn(j,n) lx[i] = max(lx[i],w[i][j]);
	forn(i,n){
		while(1){
			clr(smk,0),clr(tmk,0);
			if(match(i)) break;
			else update();
		}
	}
}

double x[2][N],y[2][N];

int main()
{
	int cas = 0;
	while(scanf("%d",&n) != EOF){
		if(cas++) puts("");
		for(int i = 0;i < 2;i++){
			for(int j = 1;j <= n;j++){
				scanf("%lf%lf",&x[i][j],&y[i][j]);
				if(i) forn(k,n){
					w[j][k] = -sqrt(sqr(x[0][k] - x[1][j]) + sqr(y[0][k] - y[1][j]));
				}
			}
		}
		KM();
		forn(i,n) printf("%d\n",lef[i]);
	}
	return 0;
}