Problem: A student's life is fraught with complications. Some Berland University students know this only too well. Having studied for two years, they contracted strong antipathy towards the chairperson of some department. Indeed, the person in question wasn't the kindest of ladies to begin with: prone to reforming groups, banning automatic passes and other mean deeds. At last the students decided that she just can't get away with all this anymore...

The students pulled some strings on the higher levels and learned that the next University directors' meeting is going to discuss n orders about the chairperson and accept exactly p of them. There are two values assigned to each order: ai is the number of the chairperson's hairs that turn grey if she obeys the order and bi — the displeasement of the directors if the order isn't obeyed. The students may make the directors pass any p orders chosen by them. The students know that the chairperson will obey exactly k out of these p orders. She will pick the orders to obey in the way that minimizes first, the directors' displeasement and second, the number of hairs on her head that turn grey.

The students want to choose p orders in the way that maximizes the number of hairs on the chairperson's head that turn grey. If there are multiple ways to accept the orders, then the students are keen on maximizing the directors' displeasement with the chairperson's actions. Help them.

Input

The first line contains three integers n (1 ≤ n ≤ 105), p (1 ≤ p ≤ n), k (1 ≤ k ≤ p) — the number of orders the directors are going to discuss, the number of orders to pass and the number of orders to be obeyed by the chairperson, correspondingly. Each of the following n lines contains two integers ai and bi (1 ≤ ai, bi ≤ 109), describing the corresponding order.

Output

Print in an arbitrary order p distinct integers — the numbers of the orders to accept so that the students could carry out the revenge. The orders are indexed from 1 to n in the order they occur in the input. If there are multiple solutions, you can print any of them.

Examples

Input

5 3 2
5 6
5 8
1 3
4 3
4 11


Output

3 1 2 

Input

5 3 3
10 18
18 17
10 20
20 18
20 18


Output

2 4 5 

Note

In the first sample one of optimal solutions is to pass orders 1, 2, 3. In this case the chairperson obeys orders number 1 and 2. She gets 10 new grey hairs in the head and the directors' displeasement will equal 3. Note that the same result can be achieved with order 4 instead of order 3.

In the second sample, the chairperson can obey all the orders, so the best strategy for the students is to pick the orders with the maximum sum of ai values. The chairperson gets 58 new gray hairs and the directors' displeasement will equal 0.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
class plan {
 public:
  int a, b, xh;
} Q[N + 3];
class splay {
 public:
  int fa, lx, rx, s, hs;
  long long pres, sum;
} q[N + 3];
long long Pre[N + 3], sum, ansx, ansy;
int n, K, P, PP, root, ans, g[N + 3], Ans[N + 3];
bool comp(const plan &A, const plan &B) {
  if (A.b == B.b) return A.a > B.a;
  return A.b < B.b;
}
void getsnew(int w) {
  int lw = q[w].lx, rw = q[w].rx;
  q[w].s = q[lw].s + q[rw].s + 1;
  q[w].sum = q[lw].sum + q[rw].sum + q[w].hs;
  q[w].pres = q[lw].sum + q[w].hs;
}
void lc(int x) {
  int y = q[x].fa, z = q[y].fa;
  q[y].rx = q[x].lx;
  q[q[y].rx].fa = y;
  q[x].lx = y;
  q[y].fa = x;
  q[x].fa = z;
  if (q[z].lx == y)
    q[z].lx = x;
  else
    q[z].rx = x;
  getsnew(y);
  getsnew(x);
}
void rc(int x) {
  int y = q[x].fa, z = q[y].fa;
  q[y].lx = q[x].rx;
  q[q[y].lx].fa = y;
  q[x].rx = y;
  q[y].fa = x;
  q[x].fa = z;
  if (q[z].lx == y)
    q[z].lx = x;
  else
    q[z].rx = x;
  getsnew(y);
  getsnew(x);
}
void splay(int x) {
  int y, z;
  for (; q[x].fa;) {
    y = q[x].fa, z = q[y].fa;
    if (!z) {
      if (q[y].lx == x)
        rc(x);
      else
        lc(x);
      break;
    }
    if (q[z].lx == y) {
      if (q[y].lx == x)
        rc(y), rc(x);
      else
        lc(x), rc(x);
    } else {
      if (q[y].lx == x)
        rc(x), lc(x);
      else
        lc(y), lc(x);
    }
  }
  root = x;
}
void insert(int x) {
  if (!root) {
    root = x;
    q[x].s = 1;
    return;
  }
  int w = root;
  for (; 3 < 33;) {
    if (q[x].hs > q[w].hs) {
      if (!q[w].lx) {
        q[w].lx = x;
        break;
      } else
        w = q[w].lx;
    } else if (!q[w].rx) {
      q[w].rx = x;
      break;
    } else
      w = q[w].rx;
  }
  q[x].fa = w;
  q[x].s = 1;
  splay(x);
}
void search(int ss) {
  int w = root;
  for (; 3 < 33;) {
    if (ss == q[q[w].lx].s + 1) break;
    if (ss <= q[q[w].lx].s)
      w = q[w].lx;
    else {
      ss -= q[q[w].lx].s + 1;
      w = q[w].rx;
    }
  }
  splay(w);
}
void Bfs(int w) {
  g[1] = w;
  if (!w) return;
  for (int l = 0, r = 1; l < r;) {
    int x = g[++l];
    Ans[++Ans[0]] = Q[x].xh;
    if (q[x].lx) g[++r] = q[x].lx;
    if (q[x].rx) g[++r] = q[x].rx;
  }
}
int main() {
  scanf("%d%d%d", &n, &K, &P);
  for (int i = 1; i <= n; i++) scanf("%d%d", &Q[i].a, &Q[i].b), Q[i].xh = i;
  sort(Q + 1, Q + n + 1, comp);
  PP = K - P;
  for (int i = 1; i <= PP; i++) sum += Q[i].b;
  Pre[PP + 1] = sum;
  for (int i = PP + 2; i <= n; i++) {
    sum -= Q[i - PP - 1].b;
    sum += Q[i - 1].b;
    Pre[i] = sum;
  }
  for (int i = n; i + P > n; i--) {
    q[i].hs = q[i].pres = q[i].sum = Q[i].a;
    insert(i);
  }
  ansx = ansy = -1;
  for (int i = n - P + 1; i >= PP + 1; i--) {
    search(P);
    long long ss = q[root].pres;
    if ((ss == ansx && Pre[i] > ansy) || (ss > ansx)) {
      ansx = ss, ansy = Pre[i];
      ans = i;
    }
    if (i > 1) {
      q[i - 1].hs = q[i - 1].pres = q[i - 1].sum = Q[i - 1].a;
      insert(i - 1);
    }
  }
  root = 0;
  for (int i = 1; i <= n; i++)
    q[i].hs = q[i].fa = q[i].lx = q[i].rx = q[i].s = q[i].pres = 0;
  for (int i = ans - 1; i >= ans - PP; i--) Ans[++Ans[0]] = Q[i].xh;
  for (int i = n; i >= ans; i--) {
    q[i].hs = q[i].pres = q[i].sum = Q[i].a;
    if (i == 4) {
      int xx = 1;
      xx -= 1;
    }
    insert(i);
  }
  search(P);
  Ans[++Ans[0]] = Q[root].xh;
  Bfs(q[root].lx);
  for (int i = 1; i < Ans[0]; i++) printf("%d ", Ans[i]);
  printf("%d", Ans[Ans[0]]);
}