inline ll read(){ ll res = 0; bool f = 0; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = 1; ch = getchar(); } while (ch <= '9' && ch >= '0') { res = (res << 3) + (res << 1) + ch - '0'; ch = getchar(); } return f ? (~res + 1) : res; }
structnode { int a, b, id; } x[N]; boolcmp(node a, node b){ return a.a + a.b > b.b + b.a; }
intmain(){
int n = read(); for (int i = 0; i < n; ++i) x[i].a = read(); for (int i = 0; i < n; ++i) x[i].b = read(), x[i].id = i + 1; sort(x, x + n, cmp); for (int i = 0; i < n; i += 2) cout << x[i].id << " "; putchar(10); for (int i = 1; i < n; i += 2) cout << x[i].id << " "; putchar(10); return0; }