//#include<iostream>
//#include<cstdio>
//
//using namespace std;
//
//#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
//
//
//struct subject{
//    char s[110];
//    int d,c;
//}sj[20];
//
//struct DP{
//    int nowa,nowd,nowp;
//}dp[(1<<16)+5];
//
//int main(){
//    cio;
//    freopen("1.in","r",stdin);
//    freopen("1.txt","w",stdout);
//    int T;
//    cin>>T;
//    while(T--){
//        int n;
//        cin>>n;
//        for(int i=0;i<n;i++){
//            cin>>sj[i].s>>sj[i].d>>sj[i].c;
//        }
//        dp[0].pre=dp[0].nowa=dp[0].nowd=0;
//        for(int i=0;i<(1<<n);i++){
//            for(int j=0;j<n;j++){
//                if((i&(1<<j))==0){
//                    int temp=i+(1<<j);
//                    dp[temp].nowa=dp[i].nowa+(dp[i].nowd+sj[j].c>sj[j].d?dp[i].nowd+sj[j].c-sj[j].d:0);
//                    dp[temp].nowd=dp[i].nowd+sj[j].c;
//                    /// issue 更新值问题
//                    dp[temp].nowp=j;
//                    //cout<<temp<<' '<<i<<endl<<dp[temp].nowa<<' '<<dp[temp].nowd<<' '<<dp[temp].pre<<endl;
//                }
//            }
//
//        }
////        cout<<dp[(1<<n)-1].nowa<<' '<<dp[(1<<n)-1].nowd<<' '<<dp[(1<<n)-1].pre<<endl;
//    cout<<endl;
//
//    }
//    return 0;
//}

#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=3e5;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
               /cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


#include<iostream>
using namespace std;
const int maxx=1e6+100;
int a[maxx][2],ans[1000];
int main()
{
    int n,m;
    cin>>n;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<i; j++)
            cin>>m,a[m][0]=i,a[m][1]=j;
    for(int i=maxx;i>0;i--)
        if(!ans[a[i][0]],!ans[a[i][1]])
            ans[a[i][0]]=a[i][1],ans[a[i][1]]=a[i][0];
    for(int i=1;i<=2*n;i++)
        cout<<ans[i]<<' ';
    cout<<endl;
    return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=3e5+4000;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
               cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=3e5;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
               // cin>>ans[++ct].val;
               ++ct;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
        cout<<ct<<endl;
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


//#include<iostream>
//#include<cstdio>
//
//using namespace std;
//
//#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
//
//
//struct subject{
//    char s[110];
//    int d,c;
//}sj[20];
//
//struct DP{
//    int nowa,nowd,nowp;
//}dp[(1<<16)+5];
//
//int main(){
//    cio;
//    freopen("1.in","r",stdin);
//    freopen("1.txt","w",stdout);
//    int T;
//    cin>>T;
//    while(T--){
//        int n;
//        cin>>n;
//        for(int i=0;i<n;i++){
//            cin>>sj[i].s>>sj[i].d>>sj[i].c;
//        }
//        dp[0].pre=dp[0].nowa=dp[0].nowd=0;
//        for(int i=0;i<(1<<n);i++){
//            for(int j=0;j<n;j++){
//                if((i&(1<<j))==0){
//                    int temp=i+(1<<j);
//                    dp[temp].nowa=dp[i].nowa+(dp[i].nowd+sj[j].c>sj[j].d?dp[i].nowd+sj[j].c-sj[j].d:0);
//                    dp[temp].nowd=dp[i].nowd+sj[j].c;
//                    /// issue 更新值问题
//                    dp[temp].nowp=j;
//                    //cout<<temp<<' '<<i<<endl<<dp[temp].nowa<<' '<<dp[temp].nowd<<' '<<dp[temp].pre<<endl;
//                }
//            }
//
//        }
////        cout<<dp[(1<<n)-1].nowa<<' '<<dp[(1<<n)-1].nowd<<' '<<dp[(1<<n)-1].pre<<endl;
//    cout<<endl;
//
//    }
//    return 0;
//}

#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=2e6;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
                cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
       // cout<<ct<<endl;
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=2e5;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
                cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
       // cout<<ct<<endl;
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


#include<iostream>
using namespace std;
const int maxx=1e6+100;
int a[maxx][2],ans[1000];
int main()
{
    int n,m;
    cin>>n;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<i; j++)
            cin>>m,a[m][0]=i,a[m][1]=j;
    for(int i=maxx;i>0;i--)
        if(!ans[a[i][0]]&&!ans[a[i][1]])
            ans[a[i][0]]=a[i][1],ans[a[i][1]]=a[i][0];
    for(int i=1;i<=2*n;i++)
        cout<<ans[i]<<' ';
    cout<<endl;
    return 0;
}


//#include<iostream>
//#include<cstdio>
//
//using namespace std;
//
//#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
//
//
//struct subject{
//    char s[110];
//    int d,c;
//}sj[20];
//
//struct DP{
//    int nowa,nowd,nowp;
//}dp[(1<<16)+5];
//
//int main(){
//    cio;
//    freopen("1.in","r",stdin);
//    freopen("1.txt","w",stdout);
//    int T;
//    cin>>T;
//    while(T--){
//        int n;
//        cin>>n;
//        for(int i=0;i<n;i++){
//            cin>>sj[i].s>>sj[i].d>>sj[i].c;
//        }
//        dp[0].pre=dp[0].nowa=dp[0].nowd=0;
//        for(int i=0;i<(1<<n);i++){
//            for(int j=0;j<n;j++){
//                if((i&(1<<j))==0){
//                    int temp=i+(1<<j);
//                    dp[temp].nowa=dp[i].nowa+(dp[i].nowd+sj[j].c>sj[j].d?dp[i].nowd+sj[j].c-sj[j].d:0);
//                    dp[temp].nowd=dp[i].nowd+sj[j].c;
//                    /// issue 更新值问题
//                    dp[temp].nowp=j;
//                    //cout<<temp<<' '<<i<<endl<<dp[temp].nowa<<' '<<dp[temp].nowd<<' '<<dp[temp].pre<<endl;
//                }
//            }
//
//        }
////        cout<<dp[(1<<n)-1].nowa<<' '<<dp[(1<<n)-1].nowd<<' '<<dp[(1<<n)-1].pre<<endl;
//    cout<<endl;
//
//    }
//    return 0;
//}

#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=2e6;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
               cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
       sort(ans+1,ans+1+ct,cmp);
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

#define cio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)

const int maxn=3e5;

int arr[maxn];

struct team{
    int x,y,val;
}ans[maxn];

bool cmp(team n,team m){
    return n.val>m.val;
}
int main(){
    //cio;
    int n;
    while(cin>>n){
        n<<=1;
        int ct=0;
        for(int i=2;i<=n;i++){
            for(int j=1;j<i;j++){
               cin>>ans[++ct].val;
                ans[ct].x=i,ans[ct].y=j;
            }
        }
        sort(ans+1,ans+1+ct,cmp);
       fill(arr,arr+maxn,0);
        for(int i=1;i<=ct;i++){
            int x=ans[i].x,y=ans[i].y;
           // cout<<x<<' '<<y<<' '<<ans[i].val<<endl;
            if(arr[x]||arr[y])continue;
            arr[x]=y,arr[y]=x;
        }
        for(int i=1;i<=n;i++){
            cout<<arr[i]<<(i==n?'\n':' ');
        }
    }
    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;
    if (n == 1) {
        cout << "2 1";
        return 0;
    }

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;
    if (n == 1) {
        cin >> n;
        cout << "2 1";
        return 0;
    }

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;
    cout << n;
    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }
    //cout << "\n";

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }
    //cout << "\n";

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        //cout << a << " " << b << " " << it->first << "\n";
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    ;//freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;
    if (n == 1) {
        cout << "1";
        return 0;
    }

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        //cout << x << " ";;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }/*
        if (count == (n << 1) - 1) {
            break;
        }*/
    }

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


/*
 * =====================================================================================
 *
 *       Filename:  320_B_finding_team_member.cpp
 *
 *    Description:  http://codeforces.com/contest/579/problem/B
 *
 *        Version:  1.0
 *        Created:  09/21/2015 08:21:30 PM
 *       Revision:  none
 *       Compiler:  gcc/g++
 *
 *         Author:  Marius-Constantin Melemciuc
 *          email:
 *   Organization:
 *
 * =====================================================================================
 */

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unordered_map>

using namespace std;

bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
    return (a.first > b.first)? true: false;
}

vector<int> solve(int n, unordered_map<int, pair<int, int> > m) {
    vector<bool> is_marked(n, false);
    vector<pair<int, int> > array;
    vector<pair<int, int> > array2;
    vector<int> team(n, 0);

    int t = 0;
    for (auto it = m.begin(); it != m.end(); it++) {
        array.push_back(make_pair(it->first, t++));
        array2.push_back(it->second);
    }

    sort(array.begin(), array.end(), cmp);

    for (auto it = array.begin(); it != array.end(); it++) {
        int a = array2[it->second].first;
        int b = array2[it->second].second;
        if (!is_marked[a - 1] && !is_marked[b - 1]) {
            team[a - 1] = b;
            team[b - 1] = a;
            is_marked[a - 1] = true;
            is_marked[b - 1] = true;
        }
    }

    return team;
}

int main() {
    int n;
    unordered_map<int, pair<int, int> > m;
#ifndef ONLINE_JUDGE
    freopen("finding_team_member.in", "r", stdin);
#endif /* ONLINE_JUDGE */

    cin >> n;
    if (n == 1) {
        cin >> n;
        cout << "2 1";
        return 0;
    }

    int count = 0;
    int a = 2, b = 1, x;
    for (int i = 0;  ; i++) {
        cin >> x;
        m[x] = make_pair(a, b);
        b++;
        if (count == (n << 1) - 1) {
            break;
        }
        if (b == a) {
            a++;
            b = 1;
        }
        if (a == (n << 1)) {
            count++;
        }
    }

    vector<int> array = solve((n << 1), m);

    for (auto it = array.begin(); it != array.end(); it++) {
        cout << *it << " ";
    }

    return 0;
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        bool use[n+1];
        int a[2*n+1][2*n+1],b[2*n+1];
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                cin>>a[i][j];
            }
        }
        int c =0;
        while(c<n)
        {
            int big=0,l=0,r=0;
            for(int i=2; i<=2*n; i++)
            {
                for(int j=1; j<i; j++)
                {
                    if((a[i][j]>big)&&!use[i]&&!use[j])
                    {
                        big=a[i][j];
                        l=i;
                        r=j;
                    }
                }
            }
            use[l]=true;
            use[r]=true;
            b[l]=r;
            b[r]=l;
            c++;
        }
        for(int i=1;i<=2*n;i++){
            cout<<b[i]<<" ";
        }
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[2*n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        //use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        if(i<n+1)use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                cout<<a[i][j]<<" "<<big<<" "<<use[i]<<" "<<use[j]<<endl;
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        cout<<l<<" "<<r<<endl;
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        bool use[n+1];
        int a[2*n+1][2*n+1],b[2*n+1];
        for(int i=0;i<=(2*n+1);i++){
            b[i]=0;
        }
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                cin>>a[i][j];
            }
        }
        int c=0;
        while(c<n)
        {
            int big=0,l=0,r=0;
            for(int i=2; i<=2*n; i++)
            {
                for(int j=1; j<i; j++)
                {
                    if((a[i][j]>big)&&!use[i]&&!use[j])
                    {
                        big=a[i][j];
                        l=i;
                        r=j;
                    }
                }
            }
            use[l]=true;
            use[r]=true;
            b[l]=r;
            b[r]=l;
            c++;
        }
        for(int i=1;i<=2*n;i++){
            cout<<b[i]<<" ";
        }
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        if(i<n+1)use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
            cout<<a[i][j]<<" ";
        }
        cout<<endl;
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        if(i<n+1)use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        cout<<l<<" "<<r<<endl;
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[2*n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
 /*   for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        use[i]=false;
    }*/
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        bool use[n+1];
        int a[2*n+1][2*n+1],b[2*n+1];
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                cin>>a[i][j];
            }
        }
        int count =0;
        while(count<2*n)
        {
            int big=0,l=0,r=0;
            for(int i=2; i<=2*n; i++)
            {
                for(int j=1; j<i; j++)
                {
                    if((a[i][j]>big)&&!use[i]&&!use[j])
                    {
                        big=a[i][j];
                        l=i;
                        r=j;
                    }
                }
            }
            use[l]=true;
            use[r]=true;
            b[l]=r;
            b[r]=l;
            count+=2;
        }
        for(int i=1;i<=2*n;i++){
            cout<<b[i]<<" ";
        }
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        if(i<n+1)use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n;
    cin>>n;
    bool use[2*n+1];
    int a[2*n+1][2*n+1],b[2*n+1];
    for(int i=0; i<=(2*n+1); i++)
    {
        b[i]=0;
        use[i]=false;
    }
    for(int i=2; i<=2*n; i++)
    {
        for(int j=1; j<i; j++)
        {
            cin>>a[i][j];
        }
    }
    int c=0;
    while(c<n)
    {
        int big=0,l=0,r=0;
        for(int i=2; i<=2*n; i++)
        {
            for(int j=1; j<i; j++)
            {
                if((a[i][j]>big)&&!use[i]&&!use[j])
                {
                    big=a[i][j];
                    l=i;
                    r=j;
                }
            }
        }
        use[l]=true;
        use[r]=true;
        b[l]=r;
        b[r]=l;
        c++;
    }
    for(int i=1; i<=2*n; i++)
    {
        cout<<b[i]<<" ";
    }
}


#include <iostream>
#define Max 400
#define INF 1000001
using namespace std;
int n,MAX,i1,i2,j2,j1,pos[Max*2];
int a[Max][Max];
int used[INF];
void test(int k) {
    if(k==n+1) {
        for(int i=0; i<2*n; i++) cout << pos[i] << " ";
    } else {
        MAX=0;
        for(int i=2; i<=2*n; i++)
            if(used[i]==0)
                for(int j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
#define Max 500
using namespace std;
long long n,MAX,i1,i2,j2,j1,pos[Max];
long long a[Max][Max];
long long used[Max],checked[Max];
void test(long long k) {
    if(k==n+1) {
        for(long long i=0; i<2*n; i++) cout << pos[i] << " ";
    } else {
        MAX=0;
        for(long long i=2; i<=2*n; i++)
            if(used[i]==0)
                for(long long j=1; j<i; j++)
                    if(checked[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;checked[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(long long i=2; i<=2*n; i++)
        for(long long j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
#define Max 500
using namespace std;
long long n,MAX,i1,i2,j2,j1,pos[Max*2];
long long a[Max][Max];
long long used[Max*2];
void test(long long k) {
    if(k==n+1) {
        for(long long i=0; i<2*n; i++) cout << pos[i] << " ";
    } else {
        MAX=0;
        for(long long i=2; i<=2*n; i++)
            if(used[i]==0)
                for(long long j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(long long i=2; i<=2*n; i++)
        for(long long j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
#define Max 400
#define INF 100001
using namespace std;
int n,MAX,i1,i2,j2,j1,pos[Max*2];
int a[Max][Max];
int used[INF];
void test(int k) {
    if(k==n+1) {
        for(int i=0; i<2*n; i++) cout << pos[i] << " ";
    } else {
        MAX=0;
        for(int i=2; i<=2*n; i++)
            if(used[i]==0)
                for(int j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
#define Max 400
using namespace std;
long long n,MAX,i1,i2,j2,j1,pos[800];
long long a[400][399];
long long used[400];
void test(long long k) {
    if(k>n) {
        for(long long i=0; i<2*n; i++) cout << pos[i] << " ";
        return;
    } else {
        MAX=0;
        for(long long i=2; i<=2*n; i++)
            if(used[i]==0)
                for(long long j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(long long i=1;i<=2*n;i++)
        used[i]==0;
    for(long long i=2; i<=2*n; i++)
        for(long long j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
using namespace std;
long long n,MAX,i1,i2,j2,j1,pos[10000];
long long a[1000][1000];
long long used[10000];
void test(long long k) {
    if(k>n) {
        for(long long i=0; i<2*n; i++) cout << pos[i] << " ";
        return;
    } else {
        MAX=0;
        for(long long i=2; i<=2*n; i++)
            if(used[i]==0)
                for(long long j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(long long i=1;i<=2*n;i++)
        used[i]==0;
    for(long long i=2; i<=2*n; i++)
        for(long long j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <iostream>
#define Max 400
using namespace std;
int n,MAX,i1,i2,j2,j1,pos[Max*2];
int a[Max][Max];
int used[Max];
void test(int k) {
    if(k==n+1) {
        for(int i=0; i<2*n; i++) cout << pos[i] << " ";
    } else {
        MAX=0;
        for(int i=2; i<=2*n; i++)
            if(used[i]==0)
                for(int j=1; j<i; j++)
                    if(used[j]==0)
                        if(MAX<a[i][j]) {
                            MAX=a[i][j];
                            i1=i;
                            j1=j;
                        }
        used[i1]=1;used[j1]=1;
        pos[i1-1]=j1;
        pos[j1-1]=i1;
        test(k+1);
    }
}
int main() {
    cin >> n;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<i; j++)
            cin >> a[i][j];
    test(1);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define NN 1111
int a[NN][NN],numx[NN],numy[NN],num[NN];
int main() {
#ifndef ONLINE_JUDGE
  freopen("in.in", "r", stdin);
  freopen("out.out", "w", stdout);
#endif
	int n,i,mx;
	int x,y;
	scanf("%d",&n);

	for(int k=2;k<=(2*n);k++){
		for(int m=1;m<k;m++){
			cin>>a[k][m];
		}
	}

	for(i=1;i<=n;i++){
			mx=0;
			for(int k=2;k<=(2*n);k++){
				for(int m=1;m<k;m++){
					if(mx<a[k][m]){
						mx=a[k][m];
						x=k;
						y=m;
					}
	  			}
	  		}
		  		numx[i]=x;
		  		numy[i]=y;
		  		for(int k=2;k<=(2*n);k++){
		  			for(int m=0;m<k;m++){
		  				if(k==x or k==y or m==x or m==y){
		  				a[k][m]=0;}
		  			}
				}
	}

	for(i=1;i<=n;i++){
		  num[numx[i]]=numy[i];
		  num[numy[i]]=numx[i];
	}
	for(i=1;i<=(2*n);i++){
		printf(" %d",num[i]);
	}return 0;
}


#include <bits/stdc++.h>
#define x first
#define y second

using namespace std;

const int NN=1000000;
pair<int,pair<int,int>>p[NN];
int n,k,cnt;
int ans[NN],vis[NN];
int main () {
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	int b;
	scanf("%d",&n);
	for(int i=2; i<=2*n; i++)
		for(int j=1; j<i; j++) {
			scanf("%d",&b);
			p[k].x=b;
			p[k].y.x=i, p[k++].y.y=j;
		}
	sort(p,p+k);
	for(int i=k-1; i>=0; i--) {
		if (vis[p[i].y.x] || vis[p[i].y.y]) continue;
		ans[p[i].y.x]=p[i].y.y;
		ans[p[i].y.y]=p[i].y.x;
		vis[p[i].y.x]=vis[p[i].y.y]=1;
	}
	for(int i=1; i<=2*n; i++) printf("%d ",ans[i]);
	puts("");
	return 0;
}


#include <bits/stdc++.h>
#define x first
#define y second

using namespace std;

const int NN=800;
pair<int,pair<int,int>>p[NN];
int n,k,cnt;
int ans[NN],vis[NN];
int main () {
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	int b;
	scanf("%d",&n);
	for(int i=2; i<=2*n; i++)
		for(int j=1; j<i; j++) {
			scanf("%d",&b);
			p[k].x=b;
			p[k].y.x=i, p[k++].y.y=j;
		}
	sort(p,p+k);
	for(int i=k-1; i>=0; i--) {
		if (vis[p[i].y.x] || vis[p[i].y.y]) continue;
		ans[p[i].y.x]=p[i].y.y;
		ans[p[i].y.y]=p[i].y.x;
		vis[p[i].y.x]=vis[p[i].y.y]=1;
	}
	for(int i=1; i<=2*n; i++) printf("%d ",ans[i]);
	puts("");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define NN 1001000
int a[NN],s[NN];
int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	int n,k;scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		s[i]=(s[i-1]+a[i])%k;
	}
	for(int i=0;i<n;i++){
		if((s[n]-s[i])%k==0){
			cerr<<i;
			printf("YES");
			return 0;
		}
		if(i!=0 and s[i]%k==0){
			cerr<<i;
			printf("YES");
			return 0;
		}
		if(i!=0 and (s[n]+s[i]-s[n-i])%k==0){
			printf("YES");
			return 0;
		}
	}
	for(int i=1;i<n;i++){
		for(int j=i+1;j<n;j++) {
			if((s[j]-s[i])%k==0){
				printf("YES");
				return 0;
			}
		}
	}
	printf("NO");

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int ans1[1000],ans2[1000],a[1000][1000],ans[1000],n,mx,x,y;
int main(){
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	scanf("%d",&n);
	for(int i=2;i<=2*n;i++) for(int j=1;j<i;j++)
		scanf("%d",&a[i][j]);
	for(int i=1;i<=n;i++){
		mx=0;
		for(int k=2;k<=2*n;k++) for(int j=1;j<k;j++){
			if(a[k][j]>mx){
				mx=a[k][j];
				x=k;y=j;
			}
		}
		ans1[i]=x;
		ans2[i]=y;
		for(int k=2;k<=2*n;k++) for(int j=1;j<k;j++){
			if(k==x or k==y or j==x or j==y) a[k][j]=0;
		}
	}
	for(int i=1;i<=n;i++){
		ans[ans1[i]]=ans2[i];
		ans[ans2[i]]=ans1[i];
	}
	for(int i=1;i<=2*n;i++){
		printf("%d ",ans[i]);
	}
	return 0;
}


#include <bits/stdc++.h>
#define x first
#define y second

using namespace std;

const int NN=200000;
pair<int,pair<int,int>>p[NN];
int n,k,cnt;
int ans[NN],vis[NN];
int main () {
#ifndef ONLINE_JUDGE
	freopen("in.in","r",stdin);
	freopen("out.out","w",stdout);
#endif
	int b;
	scanf("%d",&n);
	for(int i=2; i<=2*n; i++)
		for(int j=1; j<i; j++) {
			scanf("%d",&b);
			p[k].x=b;
			p[k].y.x=i, p[k++].y.y=j;
		}
	sort(p,p+k);
	for(int i=k-1; i>=0; i--) {
		if (vis[p[i].y.x] || vis[p[i].y.y]) continue;
		ans[p[i].y.x]=p[i].y.y;
		ans[p[i].y.y]=p[i].y.x;
		vis[p[i].y.x]=vis[p[i].y.y]=1;
	}
	for(int i=1; i<=2*n; i++) printf("%d ",ans[i]);
	puts("");
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

//void mai();

typedef pair<int,int> ii;

ii a[1000000],b[1000000];
int n,res[100000];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //mai();
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[100000];
    for(int i=0; i<n*2; i++) check[i]=0;
    for(int i=0; i<coun; i++)
    {
        if (check[b[a[i].second].first-1]==0 && check[b[a[i].second].second-1]==0)
        {
            check[b[a[i].second].first-1]=1;
            check[b[a[i].second].second-1]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
    for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

typedef pair<int,int> ii;

ii a[100],b[100];
int n,res[100];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[100000];
    for(int i=0; i<coun; i++) check[i]=0;
    for(int i=0; i<coun; i++)
    {
        if (check[b[a[i].second].first]==0 && check[b[a[i].second].second]==0)
        {
            check[b[a[i].second].first]=1;
            check[b[a[i].second].second]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
    for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

typedef pair<int,int> ii;

ii a[100000],b[100000];
int n,res[100000];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[100000];
    for(int i=0; i<coun; i++) check[i]=0;
    for(int i=0; i<coun; i++)
    {
        if (check[b[a[i].second].first]==0 && check[b[a[i].second].second]==0)
        {
            check[b[a[i].second].first]=1;
            check[b[a[i].second].second]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
    for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

typedef pair<int,int> ii;

ii a[100000],b[100000];
int n,res[100000];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[100000];
    for(int i=0; i<n*2; i++) check[i]=0;
    for(int i=0; i<coun; i++)
    {
        if (check[b[a[i].second].first-1]==0 && check[b[a[i].second].second-1]==0)
        {
            check[b[a[i].second].first-1]=1;
            check[b[a[i].second].second-1]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
    for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

//void mai();

typedef pair<long,long> ii;

ii a[319600],b[319600];
int n,res[800];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //mai();
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[800];
    for(int i=0; i<n*2; i++) check[i]=0;
    for(int i=0; i<=coun; i++)
    {
        if (check[b[a[i].second].first-1]==0 && check[b[a[i].second].second-1]==0)
        {
            check[b[a[i].second].first-1]=1;
            check[b[a[i].second].second-1]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
     for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

//void mai();

typedef pair<long,long> ii;

ii a[319600],b[319600];
int n,res[800];

int compare (const void * a, const void * b)
{
  return ( *(int*)a > *(int*)b );
}

bool compare1 (ii i, ii j)
{
    return (i.first > j.first);
}

int main()
{
    //mai();
    //freopen("B.INP", "r", stdin);
    //freopen("B.OUT", "w", stdout);
    cin >> n;
    int coun=-1;
    for(int i=2; i<=2*n; i++)
        for(int j=1; j<=i-1; j++)
        {
            coun++;
            cin >> a[coun].first;
            a[coun].second=coun;
            b[coun].first=i;
            b[coun].second=j;
        }
    //qsort(a,coun+1,sizeof(ii), compare);
    sort(a,a + coun + 1,compare1);
    bool check[800];
    for(int i=0; i<n*2; i++) check[i]=0;
    for(int i=0; i<coun; i++)
    {
        if (check[b[a[i].second].first-1]==0 && check[b[a[i].second].second-1]==0)
        {
            check[b[a[i].second].first-1]=1;
            check[b[a[i].second].second-1]=1;
            res[b[a[i].second].first-1]=b[a[i].second].second;
            res[b[a[i].second].second-1]=b[a[i].second].first;
        }
    }
    for(int i=0; i<n*2; i++) cout << res[i] << " ";
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=405,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],maxstr[maxn];

int main()
{
	int n,i,j,ans,temp;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}
	for(i=0;i<n;i++)
	{
		temp=-INF;
		for(j=0;j<n;j++)
			if(temp<a[i][j])
			temp=a[i][j];
		maxstr[i]=temp;
	}

	/*for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
			printf("%d   ",a[i][j]);

		printf("\n");
	}

	memset(vis,-1,sizeof(vis));
	for(i=0;i<n;i++)
	{
		if(vis[i]==-1)
		{
			temp=-INF,ans=0;
			for(j=0;j<n;j++)
			if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
				temp=a[i][j],ans=j;
			vis[ans]=i,vis[i]=ans;
			printf("%d",vis[i]+1);
		}
		else
			printf("%d",vis[i]+1);
		if(i==n-1)
			printf("\n");
		else
			printf(" ");
	}*/
	memset(vis,0,sizeof(vis));
	for(i=0;i<n;i++)
	{
		temp=-INF,ans=0;
		for(j=0;j<n;j++)
			if(!vis[j] && temp<a[i][j])
				temp=a[i][j],ans=j;
		vis[ans]=1;
		printf("%d",ans+1);
		if(i==n-1)
			printf("\n");
		else
			printf(" ");
	}

	return 0;
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=805,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],maxstr[maxn],all=0;

int main()
{
	int n,i,j,ans,temp,flag;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}

	memset(vis,-1,sizeof(vis));
	while(all<n)
	{
		for(i=0;i<n;i++)
		{
			temp=-INF;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1)
					temp=a[i][j];
			maxstr[i]=temp;
		}

		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF,ans=0,flag=0;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
					temp=a[i][j],ans=j,flag=1;
			if(flag)
			{
				all+=2;
				vis[ans]=i,vis[i]=ans;
			}
		}
	}
	for(i=0;i<n-1;i++)
		printf("%d ",vis[i]+1);
	printf("%d\n",vis[n-1]+1);

	return 0;
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=405,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],key[maxn][maxn],maxstr[maxn],all=0;

int main()
{
	int n,i,j,ans,temp,flag;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}
	for(i=0;i<n;i++)
	{
		temp=-INF;
		for(j=0;j<n;j++)
			if(temp<a[i][j])
			temp=a[i][j];
		maxstr[i]=temp;
	}

	for(i=0;i<n;i++)
	{
		for(j=0;j<n;j++)
			printf("%d   ",a[i][j]);

		printf("\n");
	}

	memset(vis,-1,sizeof(vis));
	while(all<n)
	{
		for(i=0;i<n;i++)
		{
			temp=-INF;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1)
					temp=a[i][j];
			maxstr[i]=temp;
		}

		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF,ans=0,flag=0;
			for(j=0;j<n;j++)
			if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
				temp=a[i][j],ans=j,flag=1;
			if(flag)
			{
				all+=2;
				vis[ans]=i,vis[i]=ans;
			}
		}
	}
	for(i=0;i<n-1;i++)
		printf("%d ",vis[i]+1);
	printf("%d\n",vis[n-1]+1);

	return 0;
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=805,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],maxstr[maxn],all=0;

int main()
{
	int n,i,j,ans,temp,flag;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}

	memset(vis,-1,sizeof(vis));
	while(all<n)
	{
		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1)
					temp=a[i][j];
			maxstr[i]=temp;
		}

		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF,ans=0,flag=0;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
					temp=a[i][j],ans=j,flag=1;
			if(flag && maxstr[i]==temp)
			{
				all+=2;
				vis[ans]=i,vis[i]=ans;
			}
		}
	}
	for(i=0;i<n-1;i++)
		printf("%d ",vis[i]+1);
	printf("%d\n",vis[n-1]+1);

	return 0;
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=405,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],key[maxn][maxn],maxstr[maxn],all=0;

int main()
{
	int n,i,j,ans,temp,flag;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}
	for(i=0;i<n;i++)
	{
		temp=-INF;
		for(j=0;j<n;j++)
			if(temp<a[i][j])
			temp=a[i][j];
		maxstr[i]=temp;
	}

	memset(vis,-1,sizeof(vis));
	while(all<n)
	{
		for(i=0;i<n;i++)
		{
			temp=-INF;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1)
					temp=a[i][j];
			maxstr[i]=temp;
		}

		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF,ans=0,flag=0;
			for(j=0;j<n;j++)
			if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
				temp=a[i][j],ans=j,flag=1;
			if(flag)
			{
				all+=2;
				vis[ans]=i,vis[i]=ans;
			}
		}
	}
	for(i=0;i<n-1;i++)
		printf("%d ",vis[i]+1);
	printf("%d\n",vis[n-1]+1);

	return 0;
}


#include<bits/stdc++.h>

using namespace std;
const int maxn=805,INF=0x3f3f3f3f;
int a[maxn][maxn],vis[maxn],maxstr[maxn],all=0;

int main()
{
	int n,i,j,ans,temp,flag;
	scanf("%d",&n);
	n*=2;
	for(i=0;i<maxn;i++)
		a[i][i]=-INF;
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			scanf("%d",&a[i][j]);
			a[j][i]=a[i][j];
		}

	memset(vis,-1,sizeof(vis));
	while(all<n)
	{
		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1)
					temp=a[i][j];
			maxstr[i]=temp;
		}

		for(i=0;i<n;i++)
		{
			if(vis[i]!=-1)
				continue;
			temp=-INF,ans=0,flag=0;
			for(j=0;j<n;j++)
				if(temp<a[i][j] && vis[j]==-1 && maxstr[j]==a[i][j])
					temp=a[i][j],ans=j,flag=1;
			if(flag)
			{
				all+=2;
				vis[ans]=i,vis[i]=ans;
			}
		}
	}
	for(i=0;i<n-1;i++)
		printf("%d ",vis[i]+1);
	printf("%d\n",vis[n-1]+1);

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 405
#define M 1000000007

int n;
int uN, vN; //点,边的数目, 使用前赋值
int g[N][N];
int linker[N];
bool used[N];
bool dfs(int u) {
  for (int v = 0; v < vN; v++) {
    if (g[u][v] && !used[v]) {
      used[v] = true;
      if (linker[v] == -1 || dfs(linker[v])) {
        linker[v] = u; return true;
      }
    }
  }
  return false;
}

int hungary() {
  int res = 0;
  memset(linker, -1, sizeof(linker));
  for (int u = 0; u < uN; u++) {
    memset(used, 0, sizeof(used));
    if (dfs(u)) { res++; }
  }
  return res;
}

int main() {
  int v;
  scanf("%d", &n);
  int nn = n * 2;
  for (int i = 1; i < nn; i++) {
    for (int j = 0; j < i; j++) {
      scanf("%d", &v);
      g[i][j] = g[j][i] = v;
    }
  }
  uN = nn; vN = (nn - 1) * nn / 2;
  hungary();
  for (int i = 0; i < nn; i++) {
    if (i) { putchar(' '); }
    printf("%d", linker[i] + 1);
  }
  putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 405
#define M 1000000007

struct Node {
  int u, v, c;
  Node(int _u, int _v, int _c) : u(_u), v(_v), c(_c) {}
  bool operator<(const Node obj) const { return c < obj.c; }
};
int n;
int ans[N];
priority_queue<Node> que;

int main() {
  int c;
  Node t(0, 0, 0);
  scanf("%d", &n);
  int nn = n * 2;
  for (int i = 2; i <= nn; i++) {
    for (int j = 1; j < i; j++) {
      scanf("%d", &c);
      que.push(Node(i, j, c));
    }
  }
  while (!que.empty()) {
    Node t = que.top(); que.pop();
    //printf("%d %d %d\n", t.u, t.v, t.c);
    if (ans[t.u] == 0 && ans[t.v] == 0) {
      ans[t.u] = t.v; ans[t.v] = t.u;
    }
  }
  for (int i = 1; i <= nn; i++) {
    if (i > 1) { putchar(' '); }
    printf("%d", ans[i]);
  }
  putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 405
#define M 1000000007

struct Node {
  int u, v, c;
  Node(int _u, int _v, int _c) : u(_u), v(_v), c(_c) {}
  bool operator<(const Node obj) const { return c < obj.c; }
};
int n;
int mp[N][N];
int ans[N];
priority_queue<Node> que;

int main() {
  int c;
  Node t(0, 0, 0);
  scanf("%d", &n);
  int nn = n * 2;
  for (int i = 2; i <= nn; i++) {
    for (int j = 1; j < i; j++) {
      scanf("%d", &c);
      que.push(Node(j, i, c));
      mp[i][j] = mp[j][i] = c;
    }
  }
  while (!que.empty()) {
    Node t = que.top(); que.pop();
    //printf("%d %d %d\n", t.u, t.v, t.c);
    if (ans[t.u] == 0 && ans[t.v] == 0) {
      ans[t.u] = t.v; ans[t.v] = t.u;
    }
  }
  int pos, mx = 0;
  for (int i = 1; i <= nn; i++) {
    if (ans[i] == 0) {
      mx = 0;
      for (int j = i + 1; j <= nn; j++) {
        if (ans[j] == 0) {
          if (mp[i][j] > mx) {
            mx = mp[i][j]; pos = j;
          }
        }
      }
      ans[i] = pos; ans[pos] = i;
    }
  }
  for (int i = 1; i <= nn; i++) {
    if (i > 1) { putchar(' '); }
    printf("%d", ans[i]);
  }
  putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 405
#define M 1000000007

struct Node {
  int u, v, c;
  Node(int _u = 0, int _v = 0, int _c = 0) : u(_u), v(_v), c(_c) {}
  bool operator<(const Node obj) const { return c > obj.c; }
} e[N *N];
bool used[N *N];
int n, tot;
//int mp[N][N];
int ans[N];

int main() {
  int c;
  scanf("%d", &n);
  int nn = n * 2, m = (nn - 1) * nn / 2;
  for (int i = 2; i <= nn; i++) {
    for (int j = 1; j < i; j++) {
      scanf("%d", &c);
      e[tot++] = Node(j, i, c);
      //mp[i][j] = mp[j][i] = c;
    }
  }
  sort(e, e + m);
  int cnt = 0, i;
  while (cnt < nn) {
    for (i = 0; i < tot && (used[i] || ans[e[i].u] || ans[e[i].v]); i++);
    ans[e[i].u] = e[i].v; ans[e[i].v] = e[i].u;
    cnt += 2;
    used[i] = true;
  }
  for (int i = 1; i <= nn; i++) {
    if (i > 1) { putchar(' '); }
    printf("%d", ans[i]);
  }
  putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 405
#define M 1000000007

int n;
#define INF 0x3f3f3f3f
int nx, ny, g[N][N]; //点数 二分图描述
int linker[N], lx[N], ly[N]; //y中各点匹配状态, x,y中的点标号
int slack[N];
bool visx[N], visy[N];
bool dfs(int x) {
  visx[x] = true;
  for (int y = 0; y < ny; y++) {
    if (visy[y]) { continue; }
    int tmp = lx[x] + ly[y] - g[x][y];
    if (tmp == 0) {
      visy[y] = true;
      if (linker[y] == -1 || dfs(linker[y])) {
        linker[y] = x; return true;
      }
    } else if (slack[y] > tmp) {
      slack[y] = tmp;
    }
  }
  return false;
}

int KM() {
  memset(linker, -1, sizeof(linker));
  memset(ly, 0, sizeof(ly));
  for (int i = 0; i < nx; i++) {
    lx[i] = -INF;
    for (int j = 0; j < ny; j++) {
      if (g[i][j] > lx[i]) { lx[i] = g[i][j]; }
    }
  }
  for (int x = 0; x < nx; x++) {
    memset(slack, 0x3f, sizeof(slack));
    while (true) {
      memset(visx, false, sizeof(visx));
      memset(visy, false, sizeof(visy));
      if (dfs(x)) { break; }
      int d = INF;
      for (int i = 0; i < ny; i++) {
        if (!visy[i] && d > slack[i]) { d = slack[i]; }
      }
      for (int i = 0; i < nx; i++) {
        if (visx[i]) { lx[i] -= d; }
      }
      for (int i = 0; i < ny; i++) {
        if (visy[i]) { ly[i] += d; }
        else { slack[i] -= d; }
      }
    }
  }
  int res = 0;
  for (int i = 0; i < ny; i++) {
    if (linker[i] != -1) { res += g[linker[i]][i]; }
  }
  return res;
}

int main() {
  int v;
  scanf("%d", &n);
  int nn = n * 2;
  nx = ny = n;
  for (int i = 1; i < nn; i++) {
    for (int j = 0; j < i; j++) {
      scanf("%d", &v);
      g[i][j] = g[j][i] = v;
    }
  }
  KM();
  for (int i = 0; i < nn; i++) {
    if (i) { putchar(' '); }
    printf("%d", linker[i] + 1);
  }
  putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define N 805
#define M 1000000007

struct Node {
  int u, v, c;
  Node(int _u, int _v, int _c) : u(_u), v(_v), c(_c) {}
  bool operator<(const Node obj) const { return c < obj.c; }
};
int n;
int ans[N];
priority_queue<Node> que;

int main() {
  int c;
  Node t(0, 0, 0);
  scanf("%d", &n);
  int nn = n * 2;
  for (int i = 2; i <= nn; i++) {
    for (int j = 1; j < i; j++) {
      scanf("%d", &c);
      que.push(Node(i, j, c));
    }
  }
  while (!que.empty()) {
    Node t = que.top(); que.pop();
    //printf("%d %d %d\n", t.u, t.v, t.c);
    if (ans[t.u] == 0 && ans[t.v] == 0) {
      ans[t.u] = t.v; ans[t.v] = t.u;
    }
  }
  for (int i = 1; i <= nn; i++) {
    if (i > 1) { putchar(' '); }
    printf("%d", ans[i]);
  }
  putchar('\n');
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

int n;
int a[1000001][2];
int check[805] = {0};
int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 1; i <= n; i++)
    {
        for(int j = 1; j < i; j++)
        {
            int x;
            scanf("%d", &x);
            a[x][0] = i;
            a[x][1] = j;
        }
    }
    for(int i = 1000000; i >= 0; i--)
    {
        if(check[a[i][0]] == 0 && check[a[i][1]] == 0)
        {
            check[a[i][0]] = a[i][1];
            check[a[i][1]] = a[i][0];
        }
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pii> p;
int check[805] = {0};

int main()
{
    scanf("%d", &n);
    for(int i = 2; i <= 2*n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end());
    for(int i = (int)p.size()-1; i >= 0; i--)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] == 0 && check[y] == 0)
        {
            check[x] = y;
            check[y] = x;
        }
    }
    for(int i = 1; i <= 2*n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pair<int, pair<int, int> > > p;
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 2; i <= n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end(), greater<pair<int, pair<int, int> > >());
    for(int i = 0; i < p.size(); i++)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] == 0 && check[y] == 0)
        {
            check[x] = y;
            check[y] = x;
        }
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pair<int, pair<int, int> > > p;
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 2; i <= n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end(), greater<pair<int, pair<int, int> > >());
    for(int i = 0; i < p.size(); i++)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] || check[y])
        {
            check[x] = y;
            check[y] = x;
        }
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

int n;
int a[1000001][2];
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 1; i <= n; i++)
    {
        for(int j = 1; j < i; j++)
        {
            int x;
            scanf("%d", &x);
            a[x][0] = i;
            a[x][1] = j;
        }
    }
    for(int i = 1000000; i >= 0; i--)
    {
        if(check[a[i][0]] == 0 && check[a[i][1]] == 0)
        {
            check[a[i][0]] = a[i][1];
            check[a[i][1]] = a[i][0];
        }
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pii> p;
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    for(int i = 2; i <= 2*n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end());
    for(int i = (int)p.size()-1; i >= 0; i--)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] == 0 && check[y] == 0)
        {
            check[x] = y;
            check[y] = x;
        }
    }
    for(int i = 1; i <= 2*n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pair<int, pair<int, int> > > p;
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 2; i <= n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end(), greater<pair<int, pair<int, int> > >());
    for(int i = 0; i < p.size(); i++)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] || check[y])
            continue;
        check[x] = y;
        check[y] = x;
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <functional>

#define player second
#define power first
using namespace std;

typedef pair<int, int> ii;
typedef pair<int, ii> pii;

int n;
vector <pii> p;
int check[405] = {0};

int main()
{
    scanf("%d", &n);
    n = n*2;
    for(int i = 2; i <= n; i++)
    {
        for(int j = 1; j <= i-1; j++)
        {
            int x;
            scanf("%d", &x);
            p.push_back(pii(x, ii(i, j)));
        }
    }
    sort(p.begin(), p.end(), greater<pii>());
    for(int i = 0; i < p.size(); i++)
    {
        int x = p[i].second.first, y = p[i].second.second;
        if(check[x] == 0 && check[y] == 0)
        {
            check[x] = y;
            check[y] = x;
        }
    }
    for(int i = 1; i <= n; i++)
        printf("%d ", check[i]);
}


/*
 * University Federal of Campina Grande
 * Student: Diego Adolfo Silva de Araújo
 * Registry: 113210090
 * Discipline: Algoritmos Avançados
 *
 * Codeforces
 * Problem: 579B - B. Finding Team Member
 * Time limit per test: 2 seconds
 * Memory limit per test: 256 megabytes
 * Input: standard input
 * Output: standard output
 */

#include <iostream>

#define MAX_PEOPLE 801

using namespace std;

typedef struct {
    int one, two, strength;
} Team;

int cmp(const void *a, const void *b)
{
    return (*(Team*)b).strength - (*(Team*)a).strength;
}

int used[MAX_PEOPLE];

int main() {
    int N;
    scanf("%d", &N);

    int k = 0;
    Team groups[2*N*N - N];
    for(int i = 2; i <= 2*N; i++)
    {
        for(int j = 1; j < i; j++)
        {
            groups[k].one = i;
            groups[k].two = j;
            scanf("%d", &groups[k++].strength);
        }
    }
    int teams[2*N+1];
    qsort(groups, k, sizeof(Team), cmp);

    for(int i = 0; i < k; i++)
    {
        if(!used[groups[i].one] && !used[groups[i].two])
        {
            teams[groups[i].two] = groups[i].one;
            teams[groups[i].one] = groups[i].two;
            used[groups[i].one] = used[groups[i].two] = 1;
        }
    }
    for(int j = 1; j <= 2*N; ++j)
    {
        printf("%d ", teams[j]);
    }
    printf("\n");
    return 0;
}


/*
 * University Federal of Campina Grande
 * Student: Diego Adolfo Silva de Araújo
 * Registry: 113210090
 * Discipline: Algoritmos Avançados
 *
 * Codeforces
 * Problem: 579B - B. Finding Team Member
 * Time limit per test: 2 seconds
 * Memory limit per test: 256 megabytes
 * Input: standard input
 * Output: standard output
 */

#include <iostream>

#define MAX_PEOPLE 801

using namespace std;

typedef struct {
    int one, two, strength;
} Team;

int cmp(const void *a, const void *b)
{
    return (*(Team*)b).strength - (*(Team*)a).strength;
}

int used[MAX_PEOPLE];

int main() {
    int N;
    scanf("%d", &N);

    int k = 0;
    Team groups[2*N*N - N];
    for(int i = 2; i <= 2*N; i++)
    {
        for(int j = 1; j < i; j++)
        {
            groups[k].one = i;
            groups[k].two = j;
            scanf("%d", &groups[k++].strength);
        }
    }
    int teams[2*N+1];
    qsort(groups, k, sizeof(Team), cmp);

    for(int i = 0; i < k; i++)
    {
        if(!used[groups[i].one] && !used[groups[i].two])
        {
            teams[groups[i].two] = groups[i].one;
            teams[groups[i].one] = groups[i].two;
            used[groups[i].one] = used[groups[i].two] = 1;
        }
    }
    for(int t = 1; t <= 2*N; t++)
    {
        printf("%d ", teams[t]);
    }
    printf("\n");
    return 0;
}


/*
 * University Federal of Campina Grande
 * Student: Diego Adolfo Silva de Araújo
 * Registry: 113210090
 * Discipline: Algoritmos Avançados
 *
 * Codeforces
 * Problem: 579B - B. Finding Team Member
 * Time limit per test: 2 seconds
 * Memory limit per test: 256 megabytes
 * Input: standard input
 * Output: standard output
 */

#include <iostream>
#include <algorithm>
#include <string.h>

using namespace std;

struct Team {
    int strength;
    int first, second;

};

int cmp(const Team& a, const Team& b)
{
    return b.strength - a.strength;
}

int main() {
    int N;
    scanf("%d", &N);

    int k = 0;
    Team teams[2*N*N-N];
    for(int i = 0; i < 2*N; i++)
    {
        for(int j = 0; j < i; j++)
        {
            int Aij;
            scanf("%d", &Aij);

            teams[k].first = i+1;
            teams[k].second = j+1;
            teams[k++].strength = Aij;
        }
    }
    int used[2*N+1];
    sort(teams, teams+k, cmp);
    memset(used, 0, sizeof(used));

    k = 0;
    used[0] = 1;

    while(N)
    {
        if(!used[teams[k].first] && !used[teams[k].second])
        {
            if(N == 1)
                printf("%d %d", teams[k].first, teams[k].second);
            else
                printf("%d %d ", teams[k].first, teams[k].second);

            N--;
            used[teams[k].first] = used[teams[k].second] = 1;
        }
        k++;
    }
    printf("\n");
    return 0;
}


/*
 * University Federal of Campina Grande
 * Student: Diego Adolfo Silva de Araújo
 * Registry: 113210090
 * Discipline: Algoritmos Avançados
 *
 * Codeforces
 * Problem: 579B - B. Finding Team Member
 * Time limit per test: 2 seconds
 * Memory limit per test: 256 megabytes
 * Input: standard input
 * Output: standard output
 */

#include <iostream>
#include <algorithm>
#include <string.h>

using namespace std;

struct Team {
    int strength;
    int first, second;

    bool operator<(const Team& rhs) const {
        return rhs.strength < strength;
    }
};

int main() {
    int N;
    scanf("%d", &N);

    int k = 0;
    Team teams[2*N*N-N];
    for(int i = 0; i < 2*N; i++)
    {
        for(int j = 0; j < i; j++)
        {
            int Aij;
            scanf("%d", &Aij);

            teams[k].first = i+1;
            teams[k].second = j+1;
            teams[k++].strength = Aij;
        }
    }
    int used[2*N+1];
    memset(used, 0, sizeof(used));

    k = 0;
    used[0] = 1;

    while(N)
    {
        if(!used[teams[k].first] && !used[teams[k].second])
        {
            if(N == 1)
                printf("%d %d", teams[k].first, teams[k].second);
            else
                printf("%d %d ", teams[k].first, teams[k].second);

            N--;
            used[teams[k].first] = used[teams[k].second] = 1;
        }
        k++;
    }
    printf("\n");
    return 0;
}


/*
 * University Federal of Campina Grande
 * Student: Diego Adolfo Silva de Araújo
 * Registry: 113210090
 * Discipline: Algoritmos Avançados
 *
 * Codeforces
 * Problem: 579B - B. Finding Team Member
 * Time limit per test: 2 seconds
 * Memory limit per test: 256 megabytes
 * Input: standard input
 * Output: standard output
 */

#include <iostream>

#define MAX_PEOPLE 801

using namespace std;

typedef struct {
    int one, two, strength;
} Team;

int cmp(const void *a, const void *b)
{
    return (*(Team*)b).strength - (*(Team*)a).strength;
}

int used[MAX_PEOPLE];

int main() {
    int N;
    scanf("%d", &N);

    int k = 0;
    Team groups[2*N*N - N];
    for(int i = 2; i <= 2*N; i++)
    {
        for(int j = 1; j < i; j++)
        {
            groups[k].one = i;
            groups[k].two = j;
            scanf("%d", &groups[k++].strength);
        }
    }
    int teams[2*N+1];
    qsort(groups, k, sizeof(Team), cmp);

    for(int i = 0; i < k; i++)
    {
        if(!used[groups[i].one] && !used[groups[i].two])
        {
            teams[groups[i].two] = groups[i].one;
            teams[groups[i].one] = groups[i].two;
            used[groups[i].one] = used[groups[i].two] = 1;
        }
    }
    for(int j = 1; j <= 2*N; j++)
    {
        printf("%d ", teams[j]);
    }
    printf("\n");
    return 0;
}


#include<vector>
#include<iostream>
#include<stdio.h>
#include<algorithm>

using namespace std;
typedef pair<int,int>pairs;
typedef pair<pairs,int>team;
bool cmp (team a,team b)
{

    if(a.second>b.second)
        return true;
    else
        return false;
}
int main()
{
    int n;
    cin>>n;
    vector<team>a;
    int arr[n][n];
    n*=2;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<=i-1;j++)
        {
                        int k;
                        cin>>k;
                        arr[i][j]=k;
                        a.push_back(team(pairs(i,j),k));
        }

    }
    sort(a.begin(),a.end(),cmp);
    //reverse(a.begin(),a.end());
    int q,w;
    for(int i=0;i<a.size();i++)
    {
        int c,b;
        team x=a[i];
        b=x.first.first;
        c=x.first.second;
        if(b==q ||b==w ||c==q||c==w)
        {
            x.second*=-1;
        }
        else if(x.second>0)
        {
            cout<<b<<" "<<c<<" ";
           // cout<<x.second<<"\n";
            q=b;
            w=c;
        }

    }

return 0;
}


#include<vector>
#include<iostream>
#include<stdio.h>
#include<algorithm>

using namespace std;
typedef pair<int,int>pairs;
typedef pair<pairs,int>team;
bool cmp (team a,team b)
{

    if(a.second>b.second)
        return true;
    else
        return false;
}
int main()
{
    int n;
    cin>>n;
    vector<team>a;
    int arr[n][n];
    n*=2;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<=i-1;j++)
        {
                int k;
                cin>>k;
                        a.push_back(team(pairs(i,j),k));
        }

    }
    sort(a.begin(),a.end(),cmp);
    //reverse(a.begin(),a.end());
    int q,w;
    for(int i=0;i<a.size();i++)
    {
        int c,b;
        team x=a[i];
        b=x.first.first;
        c=x.first.second;
        if(b==q ||b==w ||c==q||c==w)
        {
            x.second*=-1;
        }
        else if(x.second>0)
        {
            cout<<b<<" "<<c<<" ";
           // cout<<x.second<<"\n";
            q=b;
            w=c;
        }

    }

return 0;
}


#include<vector>
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
using namespace std;
typedef pair<int,int>pairs;
typedef pair<pairs,int>team;
bool cmp (team a,team b)
{

    if(a.second>b.second)
        return true;
    else
        return false;
}
int main()
{
    int n;
    cin>>n;
    vector<team>a;

    n*=2;
    bool visit[n+1];
    for(int i=1;i<=n;i++)
        visit[i]=false;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<=i-1;j++)
        {
                int k;
                cin>>k;
                        a.push_back(team(pairs(i,j),k));
        }

    }
    sort(a.begin(),a.end(),cmp);

    int q,w;
    for(int i=0;i<a.size();i++)
    {
        int c,b;
        team x=a[i];
        b=x.first.first;
        c=x.first.second;
        if(visit[b] || visit[c])
        {
            x.second*=-1;
        }
        else if(x.second>0)
        {
            cout<<b<<" "<<c<<" ";
   //         cout<<x.second<<"\n";
            visit[b]=true;
            visit[c]=true;
        }

    }

return 0;
}


#include<vector>
#include<iostream>
#include<stdio.h>
#include<algorithm>

using namespace std;
typedef pair<int,int>pairs;
typedef pair<pairs,int>team;
bool cmp (team a,team b)
{

    if(a.second>b.second)
        return true;
    else
        return false;
}
int main()
{
    int n;
    cin>>n;
    vector<team>a;
    int arr[n][n];
    n*=2;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<=i-1;j++)
        {

                        a.push_back(team(pairs(i,j),k));
        }

    }
    sort(a.begin(),a.end(),cmp);
    //reverse(a.begin(),a.end());
    int q,w;
    for(int i=0;i<a.size();i++)
    {
        int c,b;
        team x=a[i];
        b=x.first.first;
        c=x.first.second;
        if(b==q ||b==w ||c==q||c==w)
        {
            x.second*=-1;
        }
        else if(x.second>0)
        {
            cout<<b<<" "<<c<<" ";
           // cout<<x.second<<"\n";
            q=b;
            w=c;
        }

    }

return 0;
}


#include<vector>
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
using namespace std;
typedef pair<int,int>pairs;
typedef pair<pairs,int>team;
bool cmp (team a,team b)
{

    if(a.second>b.second)
        return true;
    else
        return false;
}
int main()
{
    int n;
    cin>>n;
    vector<team>a;

    n*=2;
    bool visit[n+1];
    int ans[n+1];
    for(int i=1;i<=n;i++)
        visit[i]=false;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<=i-1;j++)
        {
                int k;
                cin>>k;
                        a.push_back(team(pairs(i,j),k));
        }

    }
    sort(a.begin(),a.end(),cmp);

    int q,w;
    for(int i=0;i<a.size();i++)
    {
        int c,b;
        team x=a[i];
        b=x.first.first;
        c=x.first.second;
        if(visit[b] || visit[c])
        {
            x.second*=-1;
        }
        else if(x.second>0)
        {
            ans[b]=c;
            ans[c]=b;
   //         cout<<x.second<<"\n";
            visit[b]=true;
            visit[c]=true;
        }

    }
    for(int i=1;i<=n;i++)
        cout<<ans[i]<<" ";

return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define rev1(i,n) for(i=n;i>=1;i--)
#define REP(i,a,b) for(i=a;i<b;i++)
#define REP1(i,a,b) for(i=a;i<=b;i++)
#define pb push_back
#define pq priority_queue
#define mem(i,n) memset(i,n,sizeof(i))
#define eps 1e-7
#define debug printf("bug!!!\n")
#define sz size()
#define em empty()
#define cl clear()
#define fi first
#define se second
#define mp make_pair
#define Sort(v) sort( v.begin(),v.end() )

/*Knight direction*/
long kx[]={2,-2,2,-2,1,-1,1,-1};
long ky[]={1,1,-1,-1,2,2,-2,-2};
/*4 & 8 move direction*/
long dx[]={1,-1,0,0,1,-1,1,-1};
long dy[]={0,0,1,-1,1,1,-1,-1};
/*for 3-D move*/
//long dx[]={1,-1,0,0,0,0};
//long dy[]={0,0,1,-1,0,0};
long dz[]={0,0,0,0,1,-1};
//#define check(c,a,b,l,row,column) ( (c>=0 && c<l) && (a>=0 && a<row) && //(b>=0&&b<column))
//#define check(a,b,row,column) ((a>=0 && a<row) && (b>=0 && b<column))

/*Bit Mask DP Macros*/
#define Set(n,pos) ( n | (1<<pos) )
#define reset(n,pos) (n & (~(1<<pos)))
#define check(n,pos) ((bool)(n&(1<<pos)))

/*input && output*/
#define sf3(x,y,z) scanf("%ld %ld %ld",&x,&y,&z)
#define sf2(x,y) scanf("%ld %ld",&x,&y)
#define sf1(x) scanf("%ld",&x)
#define pf3(x,y,z) printf("%ld %ld %ld\n",x,y,z)
#define pf2(x,y) printf("%ld %ld\n",x,y)
#define pf1(x) printf("%ld",x)
#define NL puts("")
/*typedef*/
typedef long L;
typedef long long LL;
const L INF= (1e9);
inline L MOD(L a,L b)
{
    L res=a%b;
    return res<0 ? res+abs(b) : res;
}
typedef pair<L,L> pll;
typedef vector <L> vl;
typedef map < string, L > msl;
typedef map < L,string > mls;
typedef map < char, L > mcl;
typedef map < L,char > mlc;
typedef map < L, L > mll;
typedef queue <L> Queue;
typedef vector <string> vs;
typedef vector <pll> vp;
struct st
{
    L u,v,w;
    st(L a,L b,L c)
    {
        u=a,v=b,w=c;
    }
    bool operator<(const st &b) const
    {
        return w<b.w;
    }
};
#define mx 809
L mat[mx][mx],ar[mx];
int main()
{
    //freopen("input.txt","r",stdin);
    L n,x,y,z,i,j,k,l,m,p,q,r,u,v,w,t,cas,edge,node,a,b,c,d,e,f,ans,cnt,ass;
    while(sf1(n)==1)
    {
        mem(ar,-1);
        k=2*n-1;
        rep1(i,k)
        {
            rep1(j,i)
            {
                sf1(x);
                mat[i+1][j]=x;
                mat[j][i+1]=x;
            }

        }
        k++;
        vector<st> vec;
        rep1(i,k)
        {
            rep1(j,k)
            {
                if(i==j) continue;
                vec.pb(st(i,j,mat[i][j]));
            }
        }
        Sort(vec);
        k=vec.sz;
        rep(i,k)
        {
            u=vec[i].u,v=vec[i].v,w=vec[i].w;
            if(ar[u]==-1 && ar[v]==-1)
            {
                ar[u]=ar[v]=w;
                cout<<w<<" ";
            }
        }
        NL;

    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define rev1(i,n) for(i=n;i>=1;i--)
#define REP(i,a,b) for(i=a;i<b;i++)
#define REP1(i,a,b) for(i=a;i<=b;i++)
#define pb push_back
#define pq priority_queue
#define mem(i,n) memset(i,n,sizeof(i))
#define eps 1e-7
#define debug printf("bug!!!\n")
#define sz size()
#define em empty()
#define cl clear()
#define fi first
#define se second
#define mp make_pair
#define Sort(v) sort( v.begin(),v.end() )

/*Knight direction*/
long kx[]={2,-2,2,-2,1,-1,1,-1};
long ky[]={1,1,-1,-1,2,2,-2,-2};
/*4 & 8 move direction*/
long dx[]={1,-1,0,0,1,-1,1,-1};
long dy[]={0,0,1,-1,1,1,-1,-1};
/*for 3-D move*/
//long dx[]={1,-1,0,0,0,0};
//long dy[]={0,0,1,-1,0,0};
long dz[]={0,0,0,0,1,-1};
//#define check(c,a,b,l,row,column) ( (c>=0 && c<l) && (a>=0 && a<row) && //(b>=0&&b<column))
//#define check(a,b,row,column) ((a>=0 && a<row) && (b>=0 && b<column))

/*Bit Mask DP Macros*/
#define Set(n,pos) ( n | (1<<pos) )
#define reset(n,pos) (n & (~(1<<pos)))
#define check(n,pos) ((bool)(n&(1<<pos)))

/*input && output*/
#define sf3(x,y,z) scanf("%ld %ld %ld",&x,&y,&z)
#define sf2(x,y) scanf("%ld %ld",&x,&y)
#define sf1(x) scanf("%ld",&x)
#define pf3(x,y,z) printf("%ld %ld %ld\n",x,y,z)
#define pf2(x,y) printf("%ld %ld\n",x,y)
#define pf1(x) printf("%ld",x)
#define NL puts("")
/*typedef*/
typedef long L;
typedef long long LL;
const L INF= (1e9);
inline L MOD(L a,L b)
{
    L res=a%b;
    return res<0 ? res+abs(b) : res;
}
typedef pair<L,L> pll;
typedef vector <L> vl;
typedef map < string, L > msl;
typedef map < L,string > mls;
typedef map < char, L > mcl;
typedef map < L,char > mlc;
typedef map < L, L > mll;
typedef queue <L> Queue;
typedef vector <string> vs;
typedef vector <pll> vp;
#define mx 809
L mat[mx][mx],n;
L ar[mx];
int main()
{
    //freopen("input.txt","r",stdin);
    L x,y,z,i,j,k,l,m,p,q,r,u,v,w,t,cas,edge,node,a,b,c,d,e,f,ans,cnt,ass;
    while(sf1(n)==1)
    {
        mem(ar,-1);
        k=2*n-1;
        rep1(i,k)
        {
            rep1(j,i)
            {
                sf1(x);
                mat[i+1][j]=x;
                mat[j][i+1]=x;
            }

        }
        k=2*n;
        rep1(i,k)
        {
            if(ar[i]!=-1) continue;
            rep1(j,k)
            {
                if(j==i) continue;
                if(ar[j]!=-1) continue;
                L Max=-INF,idx=-1;
                rep1(a,k)
                {
                    if(j==a) continue;
                    if(ar[a]!=-1) continue;
                    if(mat[j][a]>Max)
                    {
                        Max=mat[j][a];
                        idx=a;
                    }
                }
                if(Max>0 && idx==i)
                {
                    ar[i]=j;
                    ar[j]=i;
                    break;
                }

            }
        }
        rep1(i,k)
        {
            if(i>1) putchar(' ');
            pf1(ar[i]);
        }
        NL;

    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define rev1(i,n) for(i=n;i>=1;i--)
#define REP(i,a,b) for(i=a;i<b;i++)
#define REP1(i,a,b) for(i=a;i<=b;i++)
#define pb push_back
#define pq priority_queue
#define mem(i,n) memset(i,n,sizeof(i))
#define eps 1e-7
#define debug printf("bug!!!\n")
#define sz size()
#define em empty()
#define cl clear()
#define fi first
#define se second
#define mp make_pair
#define Sort(v) sort( v.begin(),v.end() )

/*Knight direction*/
long kx[]={2,-2,2,-2,1,-1,1,-1};
long ky[]={1,1,-1,-1,2,2,-2,-2};
/*4 & 8 move direction*/
long dx[]={1,-1,0,0,1,-1,1,-1};
long dy[]={0,0,1,-1,1,1,-1,-1};
/*for 3-D move*/
//long dx[]={1,-1,0,0,0,0};
//long dy[]={0,0,1,-1,0,0};
long dz[]={0,0,0,0,1,-1};
//#define check(c,a,b,l,row,column) ( (c>=0 && c<l) && (a>=0 && a<row) && //(b>=0&&b<column))
//#define check(a,b,row,column) ((a>=0 && a<row) && (b>=0 && b<column))

/*Bit Mask DP Macros*/
#define Set(n,pos) ( n | (1<<pos) )
#define reset(n,pos) (n & (~(1<<pos)))
#define check(n,pos) ((bool)(n&(1<<pos)))

/*input && output*/
#define sf3(x,y,z) scanf("%ld %ld %ld",&x,&y,&z)
#define sf2(x,y) scanf("%ld %ld",&x,&y)
#define sf1(x) scanf("%ld",&x)
#define pf3(x,y,z) printf("%ld %ld %ld\n",x,y,z)
#define pf2(x,y) printf("%ld %ld\n",x,y)
#define pf1(x) printf("%ld",x)
#define NL puts("")
/*typedef*/
typedef long L;
typedef long long LL;
const L INF= (1e9);
inline L MOD(L a,L b)
{
    L res=a%b;
    return res<0 ? res+abs(b) : res;
}
typedef pair<L,L> pll;
typedef vector <L> vl;
typedef map < string, L > msl;
typedef map < L,string > mls;
typedef map < char, L > mcl;
typedef map < L,char > mlc;
typedef map < L, L > mll;
typedef queue <L> Queue;
typedef vector <string> vs;
typedef vector <pll> vp;
#define mx 809
L mat[mx][mx],n;
L ar[mx];
int main()
{
    //freopen("input.txt","r",stdin);
    L x,y,z,i,j,k,l,m,p,q,r,u,v,w,t,cas,edge,node,a,b,c,d,e,f,ans,cnt,ass;
    while(sf1(n)==1)
    {
        mem(ar,-1);
        k=2*n-1;
        rep1(i,k)
        {
            rep1(j,i)
            {
                sf1(x);
                mat[i+1][j]=x;
                mat[j][i+1]=x;
            }

        }
        k=2*n;
        rep1(i,k)
        {
            if(ar[i]!=-1) continue;
            L MAX=-INF,index=-1;
            rep1(j,k)
            {
                if(j==i) continue;
                if(ar[j]!=-1) continue;
                L Max=-INF,idx=-1;
                rep1(a,k)
                {
                    if(j==a) continue;
                    if(ar[a]!=-1) continue;
                    if(mat[j][a]>Max)
                    {
                        Max=mat[j][a];
                        idx=a;
                    }
                }
                if(idx==i && mat[i][j]>MAX)
                {
                    MAX=mat[i][j];
                    index=j;
                }

            }
            ar[i]=index;
            ar[index]=i;
        }
        rep1(i,k)
        {
            if(i>1) putchar(' ');
            pf1(ar[i]);
        }
        NL;

    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(i=0;i<n;i++)
#define rep1(i,n) for(i=1;i<=n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define rev1(i,n) for(i=n;i>=1;i--)
#define REP(i,a,b) for(i=a;i<b;i++)
#define REP1(i,a,b) for(i=a;i<=b;i++)
#define pb push_back
#define pq priority_queue
#define mem(i,n) memset(i,n,sizeof(i))
#define eps 1e-7
#define debug printf("bug!!!\n")
#define sz size()
#define em empty()
#define cl clear()
#define fi first
#define se second
#define mp make_pair
#define Sort(v) sort( v.begin(),v.end() )

/*Knight direction*/
long kx[]={2,-2,2,-2,1,-1,1,-1};
long ky[]={1,1,-1,-1,2,2,-2,-2};
/*4 & 8 move direction*/
long dx[]={1,-1,0,0,1,-1,1,-1};
long dy[]={0,0,1,-1,1,1,-1,-1};
/*for 3-D move*/
//long dx[]={1,-1,0,0,0,0};
//long dy[]={0,0,1,-1,0,0};
long dz[]={0,0,0,0,1,-1};
//#define check(c,a,b,l,row,column) ( (c>=0 && c<l) && (a>=0 && a<row) && //(b>=0&&b<column))
//#define check(a,b,row,column) ((a>=0 && a<row) && (b>=0 && b<column))

/*Bit Mask DP Macros*/
#define Set(n,pos) ( n | (1<<pos) )
#define reset(n,pos) (n & (~(1<<pos)))
#define check(n,pos) ((bool)(n&(1<<pos)))

/*input && output*/
#define sf3(x,y,z) scanf("%ld %ld %ld",&x,&y,&z)
#define sf2(x,y) scanf("%ld %ld",&x,&y)
#define sf1(x) scanf("%ld",&x)
#define pf3(x,y,z) printf("%ld %ld %ld\n",x,y,z)
#define pf2(x,y) printf("%ld %ld\n",x,y)
#define pf1(x) printf("%ld",x)
#define NL puts("")
/*typedef*/
typedef long L;
typedef long long LL;
const L INF= (1e9);
inline L MOD(L a,L b)
{
    L res=a%b;
    return res<0 ? res+abs(b) : res;
}
typedef pair<L,L> pll;
typedef vector <L> vl;
typedef map < string, L > msl;
typedef map < L,string > mls;
typedef map < char, L > mcl;
typedef map < L,char > mlc;
typedef map < L, L > mll;
typedef queue <L> Queue;
typedef vector <string> vs;
typedef vector <pll> vp;
struct st
{
    L u,v,w;
    st(L a,L b,L c)
    {
        u=a,v=b,w=c;
    }
    bool operator<(const st &b) const
    {
        return w>b.w;
    }
};
#define mx 809
L ar[mx];
int main()
{
    //freopen("input.txt","r",stdin);
    L n,x,y,z,i,j,k,l,m,p,q,r,u,v,w,t,cas,edge,node,a,b,c,d,e,f,ans,cnt,ass;
    while(sf1(n)==1)
    {
        mem(ar,-1);
        k=2*n-1;
        vector<st> vec;
        rep1(i,k)
        {
            rep1(j,i)
            {
                sf1(x);
                mat[i+1][j]=x;
                mat[j][i+1]=x;
                vec.pb(st(i+1,j,x));
                vec.pb(st(j,i+1,x));
            }

        }
        Sort(vec);
        k=vec.sz;
        rep(i,k)
        {
            u=vec[i].u,v=vec[i].v,w=vec[i].w;
            if(ar[u]==-1 && ar[v]==-1)
            {
                ar[u]=v,ar[v]=u;
            }
        }
        k=2*n;
        rep1(i,k)
        {
            if(i>1) putchar(' ');
            pf1(ar[i]);
        }
        NL;

    }

    return 0;
}