#include<iostream>
#include<cstdio>
#include<cfloat>
#include<cassert>
#include<cmath>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;

#define REP(i, b, e) for ( int i = b; i < e; i++ )
#define rep(i,n) REP(i, 0, n)

#define EPS (1e-8)
#define equals(a, b) (fabs((a) - (b)) < EPS )
#define dle(a, b) (equals(a, b) || a < b )

class Point{
    public:
    double x, y;
     int id;
  Point ( double x = 0, double y = 0, int id = 0): x(x), y(y), id(id){}

    Point operator + ( Point p ){ return Point(x + p.x, y + p.y); }
    Point operator - ( Point p ){ return Point(x - p.x, y - p.y); }
    Point operator * ( double a ){ return Point(x*a, y*a); }
    Point operator / ( double a ){ return Point(x/a, y/a); }

    double abs() { return sqrt(norm());}
    double norm() { return x*x + y*y; }

    bool operator < ( const Point &p ) const {
	return x != p.x ? x < p.x : y < p.y;
    }

    bool operator == ( const Point &p ) const {
	return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
    }
};

typedef Point Vector;

class Segment{
    public:
    Point p1, p2;
    Segment(Point s = Point(), Point t = Point()): p1(s), p2(t){}
};

typedef vector<Point> Polygon;

double norm( Vector a ){ return a.x*a.x + a.y*a.y; }
double abs( Vector a ){ return sqrt(norm(a)); }
Point polar( double a, double r ){ return Point(cos(r)*a, sin(r)*a);}
double getDistance( Vector a, Vector b ){ return abs(a - b); }
double dot( Vector a, Vector b ){ return a.x*b.x + a.y*b.y; }
double cross( Vector a, Vector b ){ return a.x*b.y - a.y*b.x; }

static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;

int ccw( Point p0, Point p1, Point p2 ){
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    if ( cross(a, b) > EPS ) return COUNTER_CLOCKWISE;
    if ( cross(a, b) < -EPS ) return CLOCKWISE;
    if ( dot(a, b) < -EPS ) return ONLINE_BACK;
    if ( norm(a) < norm(b) ) return ONLINE_FRONT;
    return ON_SEGMENT;
}

double arg(Vector p){
    return atan2(p.y, p.x);
}

bool yxCmp( const Point &p1, const Point &p2 ) {
    return (p1.y == p2.y) ? p1.x < p2.x : p1.y < p2.y;
}

class PolarAngleCmp{
    public:
    Point o;
    PolarAngleCmp( Point o): o(o){}
    bool operator()( const Point &p1,  const Point &p2) const {
	Vector a = Vector(p1.x-o.x, p1.y-o.y); // p1 - o
	Vector b = Vector(p2.x-o.x, p2.y-o.y); // p2 - o
	double c = cross(a, b);
	if ( fabs(c) < EPS ) return abs(a) < abs(b);
	return c > 0;
    }
};

double getArea(Point p1, Point p2, Point p3){
    return abs(0.5 * ((p3.y-p1.y)*(p2.x-p1.x)-(p2.y-p1.y)*(p3.x-p1.x)));
}

double getArea(Polygon p){
    double sum = 0.0;
    for(int i = 0; i < p.size(); i++){
	sum += cross(p[i], p[(i+1)%p.size()]);
    }
    return abs(sum/2);
}

class State{
public:
  int j, l, k;
  State(){}
  State(int j, int l, int k): j(j), l(l), k(k){}
};

static const int MAX = 41;
static const int INF = (1<<30);

int N, K;
vector<Point> P;
bool used[MAX];

double mina[MAX];
vector<int> ans[MAX];

vector<vector<int> > V[MAX];
  Polygon IN;

/*
 dp i, j, k
 */
void solve(vector<Point> C){
  int n = C.size();
  if ( n < 3 ) return;
  assert( C.begin() == min_element(C.begin(), C.end(), yxCmp));
  Point lm = *min_element(C.begin(), C.end(), yxCmp);
  sort(C.begin(), C.end(), PolarAngleCmp(lm));
  double dp[MAX][MAX][MAX];
  State pi[MAX][MAX][MAX];

  rep(i, n) rep(j, n) rep(k, n+1) {
    dp[i][j][k] = INF;
    pi[i][j][k] = State(-1, -1, -1);
  }

  for ( int j = 2; j < n; j++ ){
    for ( int l = j-1; l >= 1; l-- ){
      dp[j][l][3] = getArea(C[0], C[j], C[l]);

      vector<int> a;
      a.push_back(C[j].id);
      a.push_back(C[l].id);
      a.push_back(C[0].id);

      //      V[3].push_back(a);
      if ( mina[3] > dp[j][l][3] ){
	mina[3] = dp[j][l][3];
	ans[3] = a;
      }
    }
  }

  for ( int m = 4; m <= n; m++ ){
    for ( int j = 2; j < n; j++ ){ // last point
      for ( int l = j-1; l >= 1; l-- ) {
	for ( int k = l-1; k >= 0; k-- ){
	  if ( ccw(C[k], C[l], C[j]) == CLOCKWISE ) continue;
	  assert( ccw(C[k], C[l], C[0]) != CLOCKWISE );
	  assert( ccw(C[l], C[j], C[0]) != CLOCKWISE );
	  assert( getArea(C[j], C[l], C[0]) > 0 );

	  if ( dp[j][l][m] > dp[l][k][m-1] + getArea(C[j], C[l], C[0]) ){
	    dp[j][l][m] = dp[l][k][m-1] + getArea(C[j], C[l], C[0]);
	    pi[j][l][m] = State(l, k, m-1);
	  }


	  vector<int> a;
	  State s = State(j, l, m);
	  int last = -1;
	  while(1){
	    if ( s.j == -1 ) break;
	    a.push_back(C[s.j].id);
	    last = s.l;
	    s = pi[s.j][s.l][s.k];
	    
	  }
	  a.push_back(C[last].id);
	  a.push_back(C[0].id);
	  
	  //	  V[m].push_back(a);

	  if (  mina[m] > dp[j][l][m] ){
	    mina[m] = dp[j][l][m];
	    ans[m] = a;
	  }
	}
      }
    }
  }
}

void print(){
  assert( ans[K].size() == K );
  reverse(ans[K].begin(), ans[K].end());
  for ( int i = 0; i < ans[K].size(); i++ ){
    if (i) cout << " ";
    cout << ans[K][i];
  }
  cout << endl;

  /*
  vector<vector<int> > v = V[K];
  vector<double> r;
  for ( int i = 0; i < v.size(); i++ ){
    Polygon g;
    for ( int j = 0; j < v[i].size(); j++ ){
      g.push_back(IN[v[i][j]-1]);
    }
    double a = getArea(g);
    r.push_back(a);
  }

  sort(r.begin(), r.end());
  assert( r[0] == mina[K] );
  if ( r.size() >= 2 ){
    assert ( r[1] - r[0] >= 0.0001 );
  }
  */


  
}

void check(){
  for ( int i = 0; i < N; i++ ){
    for ( int j = 0; j < N; j++ ){
      for ( int k = 0; k < N; k++ ){
	if ( i == j ) continue;
	if ( i == k ) continue;
	if ( j == k ) continue;

	int cw = ccw(IN[i], IN[j], IN[k]);
	
	if ( ! ( cw == COUNTER_CLOCKWISE || cw == CLOCKWISE ) ){
	  assert(false);
	  cout << "hoge" << endl;
	}

      }
    }
  }
      

}


int main(){
  double x, y;
  int a, b;
  set<pair<int, int> > S;

  cin >> N;
  rep(i, N){
    //    cin >> x >> y;
    cin >> a >> b;
    S.insert( make_pair(a, b) );
    x = a;
    y = b;
    IN.push_back(Point(x, y, i+1));
  }
  sort(IN.begin(), IN.end(), yxCmp);

  check();

  assert( S.size() == N );

  int Q; cin >> Q;


  P = IN;
  rep(j, MAX) {
    mina[j] = INF;
    V[j].clear();
  }

  int s = 0;
  while( P.size() >= 3 ){
    solve(P);
    P.erase(P.begin());
  }

  rep(i, Q){
    cin >> K;
    if ( mina[K] == INF ) cout << "NA" << endl;
    else {
      print();
    }
  }
}

Measured memory_bytes: 2556