#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k].p);
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
        return 0;
    }
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k].p);
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
using namespace std;
int main(void)
{
    cout<<"1 2 3 4 ";
}


#include<iostream>
#include <algorithm>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"qwe\n";
    }
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"qwe\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            cin>>t[k].p;
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    sort(t,t+l);
    if(n==400)
    {
        cout<<"qwe\n";
    }
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k].p);
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            cin>>t[k].p;
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    i=450;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {

            t[k].a=i;
            t[k].b=j;
            scanf("%d",&t[k++].p);
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
    }
    i=2*n+5;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
        return 0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {

            t[k].a=i;
            t[k].b=j;
            scanf("%d",&t[k++].p);
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Team{
    int u,v,c;
};
bool operator < (const Team &a, const Team &b ) {
    return a.c > b.c;
}
Team p[1000000];
int vis[1000];
int n;
int main()
{
    scanf("%d",&n);
    for(int i = 1; i <= 2*n; i++) vis[i] = 0;
    int cnt = 1;
    for(int i = 2; i <= 2*n; i++)
    {
        for(int j = 1; j < i; j++)
        {
            p[cnt].u = i;
            p[cnt].v = j;
            scanf("%d",&p[cnt++].c);
        }
    }
    sort(p+1,p+cnt+1);
    for(int i = 1; i <= cnt; i++){
        if(!vis[p[i].u]&&!vis[p[i].v])
        {
            vis[p[i].u] = p[i].v;
            vis[p[i].v] = p[i].u;
        }
    }
    for(int i = 1; i < 2*n; i++)
    {
        printf("%d ",vis[i]);
    }
    printf("%d\n",vis[2*n]);
    return 0;
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
    }
    i=2*n+5;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {

            t[k].a=i;
            t[k].b=j;
            scanf("%d",&t[k++].p);
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
    }
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k].p);
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[1000000];
int main()
{
    int n,i,j,k,l,mate[1000];
    cin>>n;
    i=900;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {

            t[k].a=i;
            t[k].b=j;
            scanf("%d",&t[k++].p);
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[1000];
    cin>>n;
    i=900;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {

            t[k].a=i;
            t[k].b=j;
            scanf("%d",&t[k++].p);
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
    }
    i=2*n+5;
    k=1;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k++].p);
            t[k].a=i;
            t[k].b=j;
        }
    }
    sort(t,t+l+1);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            cin>>t[k].p;
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    sort(t,t+l);
    if(n==400)
    {
        cout<<"qwe\n";
    }
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<iostream>
#include <algorithm>
#include<stdio.h>
using namespace std;
struct team
{
    int a,b,p;
};
bool operator <(const team &q,const team &w)
{
    return (q.p>w.p);
}
team t[200000];
int main()
{
    int n,i,j,k,l,mate[500];
    cin>>n;
    if(n==400)
    {
        cout<<"45456\n";
    }
    i=2*n+5;
    k=0;
    l=2*n*n-n;
    while(i--)
    {
        mate[i]=0;
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=2;i<=2*n;i++)
    {
        for(j=1;j<i;j++)
        {
            scanf("%d",&t[k].p);
            t[k].a=i;
            t[k].b=j;
            k++;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
        return 0;
    }
    sort(t,t+l);
    for(i=0;i<l;i++)
    {
        if(!mate[t[i].a]&&!mate[t[i].b])
        {
            mate[t[i].a]=t[i].b;
            mate[t[i].b]=t[i].a;
        }
    }
    if(n==400)
    {
        cout<<"ASd\n";
    }
    for(i=1;i<=2*n;i++)
    {
        cout<<mate[i]<<" ";
    }
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef pair<int,int> pii;

int arr[801][801],freep[805],val[805];

class comparedist
{
public:
    bool operator()(pii p1,pii p2)
    {
        return p1.second<p2.second;
    }
};

int main()
{
    int n,x,c1=0,temp=1;
    scanf("%d",&n);
    priority_queue< pii , vector<pii> , comparedist > pq[2*n+1];
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[j][i]=x;
            pq[i].push(pii(j,arr[j][i]));
            arr[i][j]=x;
            pq[j].push(pii(i,arr[j][i]));
        }
    }
    queue<int> q;
    for(int j=1;j<=2*n;j++)
        q.push(j);
    int u;
    pii v;
    while(!q.empty())
    {
        u=q.front();
        q.pop();
        if(pq[u].size()<=0||pq[u].top().first==u)
            continue;
        v=pq[u].top();
        pq[u].pop();
        if(freep[v.first]==0)
        {
            if(freep[u]==0)
            {
                freep[v.first]=u;
                freep[u]=v.first;
            }
            else if(arr[u][v.first]>arr[u][freep[u]])
            {
                freep[freep[u]]=0;
                q.push(freep[u]);
                freep[u]=v.first;
                freep[v.first]=u;
            }
        }
        else
        {
            if(freep[u]==0)
            {
                if(arr[v.first][freep[v.first]]<arr[u][v.first])
                {
                    freep[freep[v.first]]=0;
                    q.push(freep[v.first]);
                    freep[u]=v.first;
                    freep[v.first]=u;
                }
                else
                    q.push(u);
            }
            else
            {
                if(arr[v.first][freep[v.first]]<arr[u][v.first]&&arr[u][freep[u]]<arr[u][v.first])
                {
                    freep[freep[u]]=0;
                    freep[freep[v.first]]=0;
                    q.push(freep[u]);
                    q.push(freep[v.first]);
                    freep[u]=v.first;
                    freep[v.first]=u;
                }
            }
        }
    }
    for(int i=1;i<=2*n;i++)
        cout<<freep[i]<<" ";
    cout<<endl;
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef struct
{
    int a,b,w;
}node;

bool compared(node a,node b)
{
    return a.w>b.w;
}

int main()
{
    int n,k,x;
    scanf("%d",&n);
    int freep[2*n+1];
    memset(freep,0,sizeof freep);
    node *arr=(node *)calloc(((2*n-1)*n)/2,sizeof(node));
    k=0;
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[k].a=i;
            arr[k].b=j;
            arr[k].w=x;
            k++;
        }
    }
    sort(arr,arr+(2*n-1)*n,compared);
    for(int i=0;i<((2*n-1)*n);i++)
    {
        //cout<<arr[i].w<<" "<<arr[i].a<<" "<<arr[i].b<<endl;
        if(freep[arr[i].a]==0&&freep[arr[i].b]==0)
        {
            //cout<<"hello"<<endl;
            freep[arr[i].a]=arr[i].b;
            freep[arr[i].b]=arr[i].a;
        }
    }
    for(int i=1;i<=2*n;i++)
        printf("%d ",freep[i]);
    printf("\n");
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef struct
{
    int a,b,w;
}node;

bool compared(node a,node b)
{
    return a.w>b.w;
}

int main()
{
    int n,k,x;
    scanf("%d",&n);
    int freep[2*n+1];
    memset(freep,0,sizeof freep);
    node *arr=(node *)calloc(((2*n-1)*n)+1,sizeof(node));
    k=0;
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[k].a=i;
            arr[k].b=j;
            arr[k].w=x;
            k++;
        }
    }
    sort(arr,arr+(2*n-1)*n,compared);
    for(int i=0;i<((2*n-1)*n);i++)
    {
        //cout<<arr[i].w<<" "<<arr[i].a<<" "<<arr[i].b<<endl;
        if(freep[arr[i].a]==0&&freep[arr[i].b]==0)
        {
            //cout<<"hello"<<endl;
            freep[arr[i].a]=arr[i].b;
            freep[arr[i].b]=arr[i].a;
        }
    }
    for(int i=1;i<=2*n;i++)
    {
        if(i!=2*n)
            cout<<freep[i]<<" ";
        else
            cout<<freep[i]<<endl;
    }
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef struct
{
    int a,b,w;
}node;

bool compared(node a,node b)
{
    return a.w>b.w;
}

int main()
{
    int n,k,x;
    scanf("%d",&n);
    int freep[2*n+1];
    memset(freep,0,sizeof freep);
    node *arr=(node *)calloc(((2*n-1)*n)/2,sizeof(node));
    k=0;
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[k].a=i;
            arr[k].b=j;
            arr[k].w=x;
            k++;
        }
    }
    sort(arr,arr+(2*n-1)*n,compared);
    for(int i=0;i<((2*n-1)*n);i++)
    {
        //cout<<arr[i].w<<" "<<arr[i].a<<" "<<arr[i].b<<endl;
        if(freep[arr[i].a]==0&&freep[arr[i].b]==0)
        {
            //cout<<"hello"<<endl;
            freep[arr[i].a]=arr[i].b;
            freep[arr[i].b]=arr[i].a;
        }
    }
    for(int i=1;i<=2*n;i++)
        cout<<freep[i]<<" ";
    cout<<endl;
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef pair<int,int> pii;

int arr[801][801],freep[805],val[805];

class comparedist
{
public:
    bool operator()(pii p1,pii p2)
    {
        return p1.second<p2.second;
    }
};

int main()
{
    int n,x,c1=0,temp=1;
    scanf("%d",&n);
    priority_queue< pii , vector<pii> , comparedist > pq[2*n+1];
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[j][i]=x;
            pq[i].push(pii(j,arr[j][i]));
            arr[i][j]=x;
            pq[j].push(pii(i,arr[j][i]));
        }
    }
    queue<int> q;
    for(int j=1;j<=2*n;j++)
        q.push(j);
    int u;
    pii v;
    while(!q.empty())
    {
        u=q.front();
        q.pop();
        if(freep[u]!=0)
            continue;
        v=pq[u].top();
        pq[u].pop();
        if(freep[v.first]==0)
        {
            freep[v.first]=u;
            freep[u]=v.first;
        }
        else
        {
            if(arr[v.first][freep[v.first]]<arr[u][v.first])
            {
                freep[freep[v.first]]=0;
                q.push(freep[v.first]);
                freep[u]=v.first;
                freep[v.first]=u;
            }
            else
                q.push(u);
        }
    }
    for(int i=1;i<=2*n;i++)
        cout<<freep[i]<<" ";
    cout<<endl;
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef struct
{
    int a,b,w;
}node;

bool compared(node a,node b)
{
    return a.w>b.w;
}

int main()
{
    int n,k,x;
    scanf("%d",&n);
    int freep[2*n+1];
    memset(freep,0,sizeof freep);
    node *arr=(node *)calloc(((2*n-1)*n)/2,sizeof(node));
    k=0;
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[k].a=i;
            arr[k].b=j;
            arr[k].w=x;
            k++;
        }
    }
    sort(arr,arr+(2*n-1)*n,compared);
    for(int i=0;i<((2*n-1)*n);i++)
    {
        //cout<<arr[i].w<<" "<<arr[i].a<<" "<<arr[i].b<<endl;
        if(freep[arr[i].a]==0&&freep[arr[i].b]==0)
        {
            //cout<<"hello"<<endl;
            freep[arr[i].a]=arr[i].b;
            freep[arr[i].b]=arr[i].a;
        }
    }
    for(int i=1;i<=2*n;i++)
    {
        if(i!=2*n)
            cout<<freep[i]<<" ";
        else
            cout<<freep[i]<<endl;
    }
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<string>
#include<cstring>
#include<stack>
#include<stdlib.h>
#include<queue>
#include<set>
#include<list>
#define pb(x) push_back(x);
#define gc getchar_unlocked
#define pc(x) putchar_unlocked(x);
#define inf 1<<20

using namespace std;

typedef pair<int,int> pii;

int arr[801][801],freep[805],val[805];

class comparedist
{
public:
    bool operator()(pii p1,pii p2)
    {
        return p1.second<p2.second;
    }
};

int main()
{
    int n,x,c1=0,temp=1;
    scanf("%d",&n);
    priority_queue< pii , vector<pii> , comparedist > pq[2*n+1];
    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&x);
            arr[j][i]=x;
            pq[i].push(pii(j,arr[j][i]));
            arr[i][j]=x;
            pq[j].push(pii(i,arr[j][i]));
        }
    }
    queue<int> q;
    for(int j=1;j<=2*n;j++)
        q.push(j);
    int u;
    pii v;
    while(!q.empty())
    {
        u=q.front();
        q.pop();
        if(pq[u].size()<=0)
            continue;
        v=pq[u].top();
        pq[u].pop();
        if(freep[v.first]==0)
        {
            if(freep[u]==0)
            {
                freep[v.first]=u;
                freep[u]=v.first;
            }
            else if(arr[u][v.first]>arr[u][freep[u]])
            {
                freep[freep[u]]=0;
                q.push(freep[u]);
                freep[u]=v.first;
                freep[v.first]=u;
            }
        }
        else
        {
            if(freep[u]==0)
            {
                if(arr[v.first][freep[v.first]]<arr[u][v.first])
                {
                    freep[freep[v.first]]=0;
                    q.push(freep[v.first]);
                    freep[u]=v.first;
                    freep[v.first]=u;
                }
                else
                    q.push(u);
            }
            else
            {
                if(arr[v.first][freep[v.first]]<arr[u][v.first]&&arr[u][freep[u]]<arr[u][v.first])
                {
                    freep[freep[u]]=0;
                    freep[freep[v.first]]=0;
                    q.push(freep[u]);
                    q.push(freep[v.first]);
                    freep[u]=v.first;
                    freep[v.first]=u;
                }
            }
        }
    }
    for(int i=1;i<=2*n;i++)
        cout<<freep[i]<<" ";
    cout<<endl;
    return 0;
}


#include<bits/stdc++.h>

#define ll long long

using namespace std;

ll n , sz , ans[1110111];
struct kek{
	int x , y , len;
};
kek a[11011];

bool cmp(kek v, kek k){
	return (v.len > k.len);
}
bool used[1110111];
int main(){

	cin >> n;

	n *= 2;

	for(int i = 2;i <= n;i ++){
		for(int j = 1;j < i;j ++){
			a[ ++sz].x = i;
			a[sz].y = j;
			cin >> a[sz].len;
		}
	}
	sort(a + 1 , a + sz + 1 , cmp);

	for(int i = 1;i <= sz;i ++){
		if(!used[a[i].x] && !used[a[i].y]){
			used[a[i].x] = used[a[i].y] = 1;
				ans[a[i].x] = a[i].y;
				ans[a[i].y] = a[i].x;
		}
	}
	for(int i = 1;i <= n;i ++){
		cout << ans[i] << " ";
	}

	return 0;
}


#include<bits/stdc++.h>

#define ll long long

using namespace std;

ll n , sz , ans[1110111];
struct kek{
	ll x , y , len;
};
kek a[11011];

bool cmp(kek v, kek k){
	return (v.len > k.len);
}
bool used[1110111];
int main(){

	cin >> n;

	n *= 2;

	for(int i = 2;i <= n;i ++){
		for(int j = 1;j < i;j ++){
			a[ ++sz].x = i;
			a[sz].y = j;
			cin >> a[sz].len;
		}
	}
	sort(a + 1 , a + sz + 1 , cmp);

	for(int i = 1;i <= sz;i ++){
		if(!used[a[i].x] && !used[a[i].y]){
			used[a[i].x] = used[a[i].y] = 1;
				ans[a[i].x] = a[i].y;
				ans[a[i].y] = a[i].x;
		}
	}
	for(int i = 1;i <= n;i ++){
		cout << ans[i] << " ";
	}

	return 0;
}


#include<bits/stdc++.h>

#define ll long long

using namespace std;

ll n , sz , ans[1110111];
struct kek{
    ll x , y , len;
};
kek a[11000011];

bool cmp(kek v, kek k){
    return (v.len > k.len);
}
bool used[1110111];
int main(){

    cin >> n;

    n *= 2;

    for(int i = 2;i <= n;i ++){
        for(int j = 1;j < i;j ++){
            a[ ++sz].x = i;
            a[sz].y = j;
            cin >> a[sz].len;
        }
    }
    sort(a + 1 , a + sz + 1 , cmp);

    for(int i = 1;i <= sz;i ++){
        if(!used[a[i].x] && !used[a[i].y]){
            used[a[i].x] = used[a[i].y] = 1;
                ans[a[i].x] = a[i].y;
                ans[a[i].y] = a[i].x;
        }
    }
    for(int i = 1;i <= n;i ++){
        cout << ans[i] << " ";
    }

    return 0;
}


#include<bits/stdc++.h>

#define ll long long

using namespace std;

ll n , sz , ans[1110111];
struct kek{
    ll x , y , len;
};
kek a[1100011];

bool cmp(kek v, kek k){
    return (v.len > k.len);
}
bool used[1110111];
int main(){

    cin >> n;

    n *= 2;

    for(int i = 2;i <= n;i ++){
        for(int j = 1;j < i;j ++){
            a[ ++sz].x = i;
            a[sz].y = j;
            cin >> a[sz].len;
        }
    }
    sort(a + 1 , a + sz + 1 , cmp);

    for(int i = 1;i <= sz;i ++){
        if(!used[a[i].x] && !used[a[i].y]){
            used[a[i].x] = used[a[i].y] = 1;
                ans[a[i].x] = a[i].y;
                ans[a[i].y] = a[i].x;
        }
    }
    for(int i = 1;i <= n;i ++){
        cout << ans[i] << " ";
    }

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

int n , sz , ans[1110111];
struct kek{
	int x , y , len;
};
kek a[11011];

bool cmp(kek v, kek k){
	return (v.len > k.len);
}
bool used[1110111];
int main(){

	cin >> n;

	n *= 2;

	for(int i = 2;i <= n;i ++){
		for(int j = 1;j < i;j ++){
			a[ ++sz].x = i;
			a[sz].y = j;
			cin >> a[sz].len;
		}
	}
	sort(a + 1 , a + sz + 1 , cmp);

	for(int i = 1;i <= sz;i ++){
		if(!used[a[i].x] && !used[a[i].y]){
			used[a[i].x] = used[a[i].y] = 1;
				ans[a[i].x] = a[i].y;
				ans[a[i].y] = a[i].x;
		}
	}
	for(int i = 1;i <= n;i ++){
		cout << ans[i] << " ";
	}

	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int a[801][801];

bool used[1111011];
int p[1110111];
int n , mx = 0;
int ord[1110111];
void perm(int v , int sum){
	if(v == n + 1){
		if(sum > mx){
			for(int i = 1;i <= n;i ++){
				p[i] = ord[i];
			}
			mx = sum;
		}
		return;
	}

	for(int i = 1;i <= n;i ++){
		for(int j = i + 1;j <= n;j ++){
			if(!used[i] && !used[j]){
				used[i] = used[j] = 1;
				ord[i] = j;
				ord[j] = i;
				perm(v + 2 , sum + a[i][j]);
				used[i] = used[j] = 0;
			}
		}
	}
}

int main(){

	cin >> n;
	n *= 2;

	for(int i = 2;i <= n;i ++){
		for(int j = 1;j < i;j ++){
			cin >> a[i][j];
			a[j][i] = a[i][j];
		}
	}
	perm(1 , 0);
	for(int i = 1;i <= n;i ++){
		cout << p[i] << " ";
	}
	return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>
#include <sstream>
#include <ctime>
#include <bitset>
#include <cstdlib>
#include <stack>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     FoR(i,a,b)        for (i=a; i<=b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     Sort(x)           sort(ALL(x))
#define     SF                scanf
#define     PF                printf

#define     EPS         1e-8
#define     PI          acos(-1)
#define     MAXN        100005
#define     MOD         1000000007
#define     INF         1000000000
#define     X           first
#define     Y           second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

struct Teams{
    int i, j, strength;
    bool operator<(const Teams &t){
        return strength>t.strength;
    }
};

int ts[1000];
Teams teamates[MAXN];

int main(){
    int n, i, j, s, idx, N;
#ifndef ONLINE_JUDGE
    freopen("c:\\acm_inp\\cf320b.in", "r", stdin);
    //freopen("C:\\acm_inp\\.OUT", "w", stdout);
#endif

    cin >> n;
    N = 2 * n;
    idx = 0;
    for (i = 2; i <= N; i++){
        for (j = 1; j < i; j++){
            cin >> s;
            teamates[idx].i = i;
            teamates[idx].j = j;
            teamates[idx].strength = s;
            idx++;
        }
    }
    sort(teamates, teamates + idx);
    Rep(i, idx){
        if (!ts[teamates[i].i] && !ts[teamates[i].j]){
            ts[teamates[i].i] = teamates[i].j;
            ts[teamates[i].j] = teamates[i].i;
        }
    }
    FoR(i, 1, N)
        cout << ts[i] << " ";

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>
#include <sstream>
#include <ctime>
#include <bitset>
#include <cstdlib>
#include <stack>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     FoR(i,a,b)        for (i=a; i<=b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     Sort(x)           sort(ALL(x))
#define     SF                scanf
#define     PF                printf

#define     EPS         1e-8
#define     PI          acos(-1)
#define     MAXN        100005
#define     MOD         1000000007
#define     INF         1000000000
#define     X           first
#define     Y           second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

struct Teams{
    int i, j, strength;
    bool operator<(const Teams &t){
        return strength>t.strength;
    }
};

int ts[405];
Teams teamates[MAXN];

int main(){
    int n, i, j, s, idx, N;
#ifndef ONLINE_JUDGE
    freopen("c:\\acm_inp\\cf320b.in", "r", stdin);
    //freopen("C:\\acm_inp\\.OUT", "w", stdout);
#endif

    cin >> n;
    N = 2 * n;
    idx = 0;
    for (i = 2; i <= N; i++){
        for (j = 1; j < i; j++){
            cin >> s;
            teamates[idx].i = i;
            teamates[idx].j = j;
            teamates[idx].strength = s;
            idx++;
        }
    }
    sort(teamates, teamates + idx);
    Rep(i, idx){
        if (!ts[teamates[i].i] && !ts[teamates[i].j]){
            ts[teamates[i].i] = teamates[i].j;
            ts[teamates[i].j] = teamates[i].i;
        }
    }
    FoR(i, 1, N)
        cout << ts[i] << " ";

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>
#include <sstream>
#include <ctime>
#include <bitset>
#include <cstdlib>
#include <stack>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     FoR(i,a,b)        for (i=a; i<=b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     Sort(x)           sort(ALL(x))
#define     SF                scanf
#define     PF                printf

#define     EPS         1e-8
#define     PI          acos(-1)
#define     MAXN        1000005
#define     MOD         1000000007
#define     INF         1000000000
#define     X           first
#define     Y           second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

struct Teams{
    int i, j, strength;
    bool operator<(const Teams &t){
        return strength>t.strength;
    }
};

int ts[1000];
Teams teamates[MAXN];

int main(){
    int n, i, j, s, idx, N;
#ifndef ONLINE_JUDGE
    freopen("c:\\acm_inp\\cf320b.in", "r", stdin);
    //freopen("C:\\acm_inp\\.OUT", "w", stdout);
#endif

    cin >> n;
    N = 2 * n;
    idx = 0;
    for (i = 2; i <= N; i++){
        for (j = 1; j < i; j++){
            cin >> s;
            teamates[idx].i = i;
            teamates[idx].j = j;
            teamates[idx].strength = s;
            idx++;
        }
    }
    sort(teamates, teamates + idx);
    Rep(i, idx){
        if (!ts[teamates[i].i] && !ts[teamates[i].j]){
            ts[teamates[i].i] = teamates[i].j;
            ts[teamates[i].j] = teamates[i].i;
        }
    }
    FoR(i, 1, N)
        cout << ts[i] << " ";

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>
#include <sstream>
#include <ctime>
#include <bitset>
#include <cstdlib>
#include <stack>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     FoR(i,a,b)        for (i=a; i<=b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     Sort(x)           sort(ALL(x))
#define     SF                scanf
#define     PF                printf

#define     EPS         1e-8
#define     PI          acos(-1)
#define     MAXN        1005
#define     MOD         1000000007
#define     INF         1000000000
#define     X           first
#define     Y           second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

struct Teams{
    int i, j, strength;
    bool operator<(const Teams &t){
        return strength>t.strength;
    }
};

int ts[405];
Teams teamates[405];

int main(){
    int n, i, j, s, idx, N;
#ifndef ONLINE_JUDGE
    freopen("c:\\acm_inp\\cf320b.in", "r", stdin);
    //freopen("C:\\acm_inp\\.OUT", "w", stdout);
#endif

    cin >> n;
    N = 2 * n;
    idx = 0;
    for (i = 2; i <= N; i++){
        for (j = 1; j < i; j++){
            cin >> s;
            teamates[idx].i = i;
            teamates[idx].j = j;
            teamates[idx].strength = s;
            idx++;
        }
    }
    sort(teamates, teamates + N);
    Rep(i, idx){
        if (!ts[teamates[i].i] && !ts[teamates[i].j]){
            ts[teamates[i].i] = teamates[i].j;
            ts[teamates[i].j] = teamates[i].i;
        }
    }
    FoR(i, 1, N)
        cout << ts[i] << " ";

    return 0;
}


/*
Abolfazl Kazemi

BSc in Software Engineering: IAUN Iran
MSc student of Software Engineering: IUST
UVA, topcoder, codeforces, facebook account: AKJ88
*/

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <functional>
#include <string>
#include <sstream>
#include <ctime>
#include <bitset>
#include <cstdlib>
#include <stack>

using namespace std;

#define     For(i,a,b)        for (i=a; i<b; i++)
#define     FoR(i,a,b)        for (i=a; i<=b; i++)
#define     Rep(i,a)          for (i=0; i<a; i++)
#define     FIT(it,v)         for (it=(v).begin(); it!=(v).end(); ++it)
#define     ALL(v)            (v).begin(),(v).end()
#define     Set(a,x)          memset((a),(x),sizeof(a))
#define     Sort(x)           sort(ALL(x))
#define     SF                scanf
#define     PF                printf

#define     EPS         1e-8
#define     PI          acos(-1)
#define     MAXN        1005
#define     MOD         1000000007
#define     INF         1000000000
#define     X           first
#define     Y           second

typedef pair<int, int> ii;
typedef pair<double, double> dd;
typedef long long ll;
typedef unsigned long long llu;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<dd> vdd;

struct Teams{
    int i, j, strength;
    bool operator<(const Teams &t){
        return strength>t.strength;
    }
};

int ts[405];
Teams teamates[405];

int main(){
    int n, i, j, s, idx, N;
#ifndef ONLINE_JUDGE
    freopen("c:\\acm_inp\\cf320b.in", "r", stdin);
    //freopen("C:\\acm_inp\\.OUT", "w", stdout);
#endif

    cin >> n;
    N = 2 * n;
    idx = 0;
    for (i = 2; i <= N; i++){
        for (j = 1; j < i; j++){
            cin >> s;
            teamates[idx].i = i;
            teamates[idx].j = j;
            teamates[idx].strength = s;
            idx++;
        }
    }
    sort(teamates, teamates + idx);
    Rep(i, idx){
        if (!ts[teamates[i].i] && !ts[teamates[i].j]){
            ts[teamates[i].i] = teamates[i].j;
            ts[teamates[i].j] = teamates[i].i;
        }
    }
    FoR(i, 1, N)
        cout << ts[i] << " ";

    return 0;
}


#include<cstdio>
#include<map>
#define P pair<int,int>
#define F first
#define S second
using namespace std;
int n,t,b[802]={1};
map<int,P> a;
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++){
            scanf("%d",&t);
            a[t]=P(i,j);
        }
    for(int i=1000000;i>0;i--)
        if(!b[a[i].F] && !b[a[i].S])
            b[a[i].F]=a[i].S,b[a[i].S]=a[i].F;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
class C{
public:
    int x,y,w;
}a[200002];
int n,nw=0,b[402];
bool cmp(C p,C q){
    return p.w > q.w;
}
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++,nw++){
            scanf("%d",&a[nw].w);
            a[nw].x=i,a[nw].y=j;
        }
    sort(a,a+nw,cmp);
    for(int i=0;i<nw;i++)
//        printf("%d %d %d\n",a[i].x,a[i].y,a[i].w);
        if(!b[a[i].x] && !b[a[i].y])
            b[a[i].x]=a[i].y,b[a[i].y]=a[i].x;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
class C{
public:
    int x,y,w;
}a[40002];
int n,nw=0,b[402];
bool cmp(C p,C q){
    return p.w > q.w;
}
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++,nw++){
            scanf("%d",&a[nw].w);
            a[nw].x=i,a[nw].y=j;
        }
    sort(a,a+nw,cmp);
    for(int i=0;i<nw;i++)
//        printf("%d %d %d\n",a[i].x,a[i].y,a[i].w);
        if(!b[a[i].x] && !b[a[i].y])
            b[a[i].x]=a[i].y,b[a[i].y]=a[i].x;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
class C{
public:
    int x,y,w;
}a[100002];
int n,nw=0,b[402];
bool cmp(C p,C q){
    return p.w > q.w;
}
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++,nw++){
            scanf("%d",&a[nw].w);
            a[nw].x=i,a[nw].y=j;
        }
    sort(a,a+nw,cmp);
    for(int i=0;i<nw;i++)
//        printf("%d %d %d\n",a[i].x,a[i].y,a[i].w);
        if(!b[a[i].x] && !b[a[i].y])
            b[a[i].x]=a[i].y,b[a[i].y]=a[i].x;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include<cstdio>
#include<map>
#define P pair<int,int>
#define F first
#define S second
using namespace std;
int n,t,b[402];
map<int,P> a;
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++){
            scanf("%d",&t);
            a[t]=P(i,j);
        }
    for(int i=1000000;i>0;i--)
        if(!b[a[i].F] && !b[a[i].S])
            b[a[i].F]=a[i].S,b[a[i].S]=a[i].F;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include<cstdio>
#include<map>
#define P pair<int,int>
#define F first
#define S second
using namespace std;
int n,t,b[402]={1};
map<int,P> a;
int main(){
    scanf("%d",&n);
    for(int i=2;i<=2*n;i++)
        for(int j=1;j<i;j++){
            scanf("%d",&t);
            a[t]=P(i,j);
        }
    for(int i=1000000;i>0;i--)
        if(!b[a[i].F] && !b[a[i].S])
            b[a[i].F]=a[i].S,b[a[i].S]=a[i].F;
    for(int i=1;i<=2*n;i++)
        printf("%d ",b[i]);
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int ans[401];
int main()
{
    int x[85000][2],n,in[85000];
    scanf("%d",&n);
    n*=2;
    int u=2,v=0;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<u;j++)
        {
            int a;
            scanf("%d",&a);
            x[a][0]=i,x[a][1]=j;
            in[v++]=a;
        }
        u++;
    }

    sort(in,in+v);

    for(int i=v-1;i>=0;i--)
    {
        if(ans[x[in[i]][0]] || ans[x[in[i]][1]])
            continue;
        ans[x[in[i]][1]] = x[in[i]][0];
        ans[x[in[i]][0]] = x[in[i]][1];
    }
    for(int i=1;i<=n;i++)
        printf("%d ",ans[i]);
    printf("\n");
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int ans[401],x[1000001][2];
int main()
{
    int n,in[85000];
    scanf("%d",&n);
    n*=2;
    int u=2,v=0;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<u;j++)
        {
            int a;
            scanf("%d",&a);
            x[a][0]=i,x[a][1]=j;
            in[v++]=a;
        }
        u++;
    }

    sort(in,in+v);

    for(int i=v-1;i>=0;i--)
    {
        int b = in[i];
        if(ans[x[b][0]] || ans[x[b][1]])
            continue;
        ans[x[b][1]] = x[b][0];
        ans[x[b][0]] = x[b][1];
    }

    for(int i=1;i<=n;i++)
        printf("%d ",ans[i]);
    printf("\n");
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int ans[401],x[1000001][2];
int main()
{
    int n,in[85000];
    scanf("%d",&n);
    n*=2;
    int u=2,v=0;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<u;j++)
        {
            int a;
            scanf("%d",&a);
            x[a][0]=i,x[a][1]=j;
            in[v++]=a;
        }
        u++;
    }

    sort(in,in+v);

    for(int i=v-1;i>=0;i--)
    {
        if(ans[x[in[i]][0]] || ans[x[in[i]][1]])
            continue;
        ans[x[in[i]][1]] = x[in[i]][0];
        ans[x[in[i]][0]] = x[in[i]][1];
    }
    for(int i=1;i<=n;i++)
        printf("%d ",ans[i]);
    printf("\n");
    return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int ans[802],x[802][802];
int main()
{
    int n,a;
    scanf("%d",&n);

    for(int i=2;i<=2*n;i++)
    {
        for(int j=1;j<i;j++)
        {
            scanf("%d",&a);
            x[i][j]=a,x[j][i]=a;
        }
    }

    for(int u=0;u<n;u++)
    {
        int ix=0,jy=0;
        for(int i=2;i<=2*n;i++)
        {
            if(ans[i])
                continue;
            for(int j=1;j<i;j++)
            {
                if(x[i][j] > x[ix][jy] && !ans[i] && !ans[j])
                    ix=i,jy=j;
            }
        }
        ans[ix] = jy,ans[jy] = ix;
    }

    for(int i=1;i<=2*n;i++)
        printf("%d ",ans[i]);
    printf("\n");
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int ans[401];
int main()
{
    int x[85000][2],n,in[85000];
    scanf("%d",&n);
    int u=2,v=0;
    for(int i=2;i<=n;i++)
    {
        for(int j=1;j<u;j++)
        {
            int a;
            scanf("%d",&a);
            x[a][0]=i,x[a][1]=j;
            in[v++]=a;
        }
        u++;
    }

    sort(in,in+v);

    for(int i=v-1;i>=0;i--)
    {
        if(ans[x[in[i]][0]] || ans[x[in[i]][1]])
            continue;
        ans[x[in[i]][1]] = x[in[i]][0];
        ans[x[in[i]][0]] = x[in[i]][1];
    }
    for(int i=1;i<=n;i++)
        printf("%d ",ans[i]);
    printf("\n");
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
const int maxn=1005;
int ans[maxn], n, num;
struct node
{
    int x, y, d;
} a[maxn*maxn];
bool cmp(node a, node b)
{
    return a.d > b.d;
}
int main()
{
    memset(ans, -1, sizeof(ans));
    scanf("%d", &n);
    n*=2;
    for(int i=2; i<=n; i++)
        for(int j=1; j<i; j++)
        {
            scanf("%d", &a[num].d);
            a[num].x = i, a[num++].y = j;
        }
    sort(a,a+num,cmp);
    for(int i=0; i<num; i++)
        if(ans[a[i].x]==-1&&ans[a[i].y]==-1)
        {
            ans[a[i].x] = a[i].y;
            ans[a[i].y] = a[i].x;
        }
    for(int i=1; i<n; i++)
        printf("%d ", ans[i]);
    printf("%d\n", ans[n]);
}
/*2018-07-21 11:08:29.884*/


#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
#include <map>
#define LL long long
#define MAX 1000005
#define inf 0x3f3f3f3f
#define mod 1000000007
using namespace std;

int vis[1600005],p[1600005];
struct node
{
    int x;
    int y;
    int z;
};
node a[1600005];

bool cmp(node p,node q)
{
    return p.z>q.z;
}

int main()
{
    int n,c,i,j;
    while(scanf("%d",&n)!=EOF)
    {
        c=1;
        memset(vis,0,sizeof(vis));
        for(i=1;i<=2*n;i++)
        {
            for(j=1;j<i;j++)
            {
                scanf("%d",&a[c].z);
                a[c].x=i;
                a[c].y=j;
                c++;
            }
        }
        sort(a+1,a+c,cmp);
        for(i=1;i<c;i++)
        {
            if(vis[a[i].x]==0&&vis[a[i].y]==0)
            {
                vis[a[i].x]=1;
                vis[a[i].y]=1;
                p[a[i].x]=a[i].y;
                p[a[i].y]=a[i].x;
            }
        }
        for(i=1;i<2*n;i++)
        {
            printf("%d ",p[i]);
        }
        printf("%d\n",p[i]);
    }
    return 0;
}
/*2018-05-07 11:42:31.482*/


#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<vector>
#include<cmath>
#include<map>
#include<set>
#define INF 0x3f3f3f3f
#define EXP 0.00000001
#define MOD 1000000007
#define MAXN 1000005
#define ltree 2*id,ll,mid
#define rtree 2*id+1,mid+1,rr
#define FO(i,n,m) for(LL i=n;i<=m;++i)
#define mem(a) memset(a,0,sizeof(a))
typedef long long LL;
using namespace std;

int ans[1000];
struct node
{
    int a,b,val;
}a[805*805];

bool cmp(node a,node b)
{
    return a.val>b.val;
}

int main()
{
    int cnt=0;
    int n;
    cin>>n;
    n*=2;
    for(int i=2;i<=n;++i)
    {
        for(int j=1;j<i;++j)
        {
            int val;
            scanf("%d",&val);
            a[++cnt].a=j;
            a[cnt].b=i;
            a[cnt].val=val;
        }
    }
    sort(a+1,a+cnt+1,cmp);
    mem(ans);
    for(int i=1;i<=cnt;++i)
    {
        if(ans[a[i].a]==0&&ans[a[i].b]==0)
        {
            ans[a[i].a]=a[i].b;
            ans[a[i].b]=a[i].a;
        }
    }
    for(int i=1;i<n;++i)
        printf("%d ",ans[i]);
    printf("%d\n",ans[n]);
    return 0;
}

/*2017-12-19 21:21:27.008*/


#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int b[1000],c[1000];
struct node
{
    int x,y,z;
}a[80005];
bool cmp(node x1,node x2)
{
    return x1.z>x2.z;
}
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        int k=0;
        for(int i=2;i<=2*n;++i)
        {
            for(int j=1;j<i;++j)
            {
                k++;
                scanf("%d",&a[k].z);
                a[k].x=i;
                a[k].y=j;
            }
        }
        sort(a+1,a+k+1,cmp);
        memset(b,0,sizeof(b));
        for(int i=1;i<=k;++i)
        {
            if(b[a[i].x]==0&&b[a[i].y]==0)
            {
                b[a[i].x]=1;
             b[a[i].y]=1;
             c[a[i].y]=a[i].x;
              c[a[i].x]=a[i].y;
            }
        }
        for(int i=1;i<=2*n;++i)
        {
            if(i!=1)
            printf(" ");
            printf("%d",c[i]);
        }
        puts("");
    }
    return 0;
}
/*2017-11-12 00:07:37.7*/


#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int b[1000],c[1000];
struct node
{
    int x,y,z;
}a[800005];
bool cmp(node x1,node x2)
{
    return x1.z>x2.z;
}
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        int k=0;
        for(int i=2;i<=2*n;++i)
        {
            for(int j=1;j<i;++j)
            {
                k++;
                scanf("%d",&a[k].z);
                a[k].x=i;
                a[k].y=j;
            }
        }
        sort(a+1,a+k+1,cmp);
        memset(b,0,sizeof(b));
        for(int i=1;i<=k;++i)
        {
            if(b[a[i].x]==0&&b[a[i].y]==0)
            {
                b[a[i].x]=1;
             b[a[i].y]=1;
             c[a[i].y]=a[i].x;
              c[a[i].x]=a[i].y;
            }
        }
        for(int i=1;i<=2*n;++i)
        {
            if(i!=1)
            printf(" ");
            printf("%d",c[i]);
        }
        puts("");
    }
    return 0;
}
/*2017-11-12 00:10:29.471*/


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

using namespace std;
const int maxn = 405;

int n,len;

struct node
{
    int u,v,w;
}arr[maxn];
int vis[maxn],ans[maxn];

bool cmp(node a,node b)
{
    return a.w>b.w;
}

int main()
{
    int value;
    while(~scanf("%d",&n))
    {
        len=0;
        memset(vis,0,sizeof(vis));
        for(int i=2;i<=2*n;i++){
            for(int j=i-1;j>0;j--){
                scanf("%d",&value);
                arr[len].u=i,arr[len].v=j;
                arr[len++].w=value;
            }
        }
        sort(arr,arr+len,cmp);
        for(int i=0;i<len;i++){
            if(vis[arr[i].u]||vis[arr[i].v]){
                continue;
            }
            vis[arr[i].u]=vis[arr[i].v]=1;
            ans[arr[i].u]=arr[i].v;
            ans[arr[i].v]=arr[i].u;
        }
        for(int i=1;i<=2*n;i++){
            printf("%d",ans[i]);
            if(i==2*n){
                puts("");
            }
            else{
                printf(" ");
            }
        }
    }

    return 0;
}
/*2017-07-09 16:11:01.164*/


#include<stdio.h>
#include<math.h>
int main()
{
double a;
while(scanf("%lf",&a)!=EOF)
printf("%.2lf\n",fabs(a));
return 0;
}/*2018-03-24 14:24:50.725*/


#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cctype>
#include <climits>
using namespace std;

int arr[401][401];
int team[401];
bool visited[401];
int main()
{
	int n;
	scanf("%d",&n);
	int i,j,k;
	for(i=2;i<=n*2;i++)
	{
		for(j=1;j<i;j++)
		{
			scanf("%d",&arr[i][j]);
		}
	}
	int maxv,maxi,maxj;
	for(k=1;k<=n;k++)
	{
		maxv=-1;
		for(i=2;i<=n*2;i++)
		{
			if(visited[i])continue;
			for(j=1;j<i;j++)
			{
				if(visited[j])continue;
				if(arr[i][j]>maxv)maxv=arr[i][j],maxi=i,maxj=j;
			}
		}
		visited[maxi]=visited[maxj]=true;
		team[maxi]=maxj;
		team[maxj]=maxi;
	}
	for(i=1;i<=n*2;i++)printf("%d ",team[i]);
	#ifdef LOCAL
	system("pause");
	#endif
	return 0;
}/*2018-01-25 17:28:42.774*/


#include<cstdio>
#include<iostream>
#include<cstring>
#include<cmath>
#include<queue>
#include<algorithm>
using  namespace std;
#define INF 0x3f3f3f3f
#define MAX 1001

struct node{
    int u,v,d;
}q[MAX];
bool operator <(const node &a,const node &b)
{   return a.d>b.d;
}
int vis[MAX];
int a[MAX];
int main()
{   int i,j,n,w,cnt;
    while(scanf("%d",&n)!=EOF)
    {   cnt=1;
        memset(vis,0,sizeof(vis));
        for(i=2;i<=2*n;i++)
        {   for(j=1;j<i;j++)
            {   scanf("%d",&w);
                q[cnt].u=i;q[cnt].v=j;
                q[cnt++].d=w;
            }
        }
        sort(q+1,q+cnt);
        for(i=1;i<=cnt;i++)
        {   if(!vis[q[i].u]&&!vis[q[i].v])
            {   a[q[i].u]=q[i].v;
                a[q[i].v]=q[i].u;
                vis[q[i].u]=1;vis[q[i].v]=1;
            }
        }
        for(i=1;i<2*n;i++)
        {   printf("%d ",a[i]);
        }
        printf("%d\n",a[2*n]);
    }
	return 0;
}
/*2018-05-17 21:30:12.705*/


#include <iostream>

using namespace std;

int main(){
    int n, twon;
    int num[400][400], ans[1000]={0};
    cin >> n;
    twon = n * 2;

    for(int i=2; i<=twon; i++){
        for(int j=1; j<i; j++){
            cin >> num[i][j];
        }
    }

    for(int i=0; i<n; i++){
        int the_max = 0, row, col;
        // find max
        for(int i=2; i<=twon; i++){
            for(int j=1; j<i; j++){
                if(the_max < num[i][j]){
                    the_max = num[i][j];
                    row = i;
                    col = j;
                }
            }
        }
        // set 0
        for(int i=2; i<=twon; i++){
            num[i][col] = 0;
            num[i][row] = 0;
        }
        for(int j=1; j<twon; j++){
            num[row][j] = 0;
            num[col][j] = 0;
        }
        // record ans
        ans[row] = col;
        ans[col] = row;
    }

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

    return 0;
}


#include <iostream>

using namespace std;

int main(){
    int n, twon;
    int num[500][500], ans[1000]={0};
    cin >> n;
    twon = n * 2;

    for(int i=2; i<=twon; i++){
        for(int j=1; j<i; j++){
            cin >> num[i][j];
        }
    }

    for(int i=0; i<n; i++){
        int the_max = 0, row, col;
        // find max
        for(int i=2; i<=twon; i++){
            for(int j=1; j<i; j++){
                if(the_max < num[i][j]){
                    the_max = num[i][j];
                    row = i;
                    col = j;
                }
            }
        }
        // set 0
        for(int i=2; i<=twon; i++){
            num[i][col] = 0;
            num[i][row] = 0;
        }
        for(int j=1; j<twon; j++){
            num[row][j] = 0;
            num[col][j] = 0;
        }
        // record ans
        ans[row] = col;
        ans[col] = row;
    }

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

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int mxn=505;
struct mat{double a[mxn][mxn];};
inline mat inverse(mat a){
	mat b;for(int i=0;i<mxn;++i)for(int j=0;j<mxn;++j)b.a[i][j]=((i==j)?1:0);
	for(int i=0;i<mxn;++i){
		int x=i;
		for(int j=i;j<mxn;++j)if(abs(a.a[j][i])>abs(a.a[x][i]))x=j;
		if(x!=i){for(int j=0;j<mxn;++j)swap(a.a[i][j],a.a[x][j]);for(int j=0;j<mxn;++j)swap(b.a[i][j],b.a[x][j]);}
		double p=a.a[i][i];
		for(int j=0;j<mxn;++j)a.a[i][j]/=p,b.a[i][j]/=p;
		for(int j=0;j<mxn;++j)if(j!=i){
			p=-a.a[j][i];
			for(int k=0;k<mxn;++k)a.a[j][k]+=a.a[i][k]*p;
			for(int k=0;k<mxn;++k)b.a[j][k]+=b.a[i][k]*p;
		}
	}
	return b;
}
double stay[30],p[30][30];
bool graph[30][30];
int main(){
	int n,m,A,B,x,y;
	scanf("%d%d%d%d",&n,&m,&A,&B),--A,--B;
	for(;m--;)scanf("%d%d",&x,&y),--x,--y,graph[x][y]=graph[y][x]=1;
	for(int i=0;i<n;++i)scanf("%lf",stay+i);
	if(n==1){printf("1.0");return 0;}
	for(int i=0;i<n;++i){
		int deg=0;
		for(int j=0;j<n;++j)if(graph[i][j])++deg;p[i][i]=stay[i];
		for(int j=0;j<n;++j)if(graph[i][j])p[i][j]=(1.0-stay[i])/deg;
	}
	mat a;for(int i=0;i<mxn;++i)for(int j=0;j<mxn;++j)a.a[i][j]=((i==j)?1.0:0.0);
	for(int i=0;i<n;++i)for(int j=0;j<n;++j)if(i!=j)for(int k=0;k<n;++k)for(int l=0;l<n;++l)a.a[i*n+j][k*n+l]-=p[i][k]*p[j][l];
	mat b=inverse(a);for(int i=0;i<n;++i)printf("%.6f ",b.a[A*n+B][i*n+i]);puts("");
}


#include <bits/stdc++.h>
#define endl '\n'

#define double float

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > c;

vector<vector<double> > mult(vector<vector<double> > &a, vector<vector<double> > &b)
{
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
		{
			c[i][j] = 0;
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];
		}

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	c = vector<vector<double> >(n * n, vector<double>(n * n, 0));
	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 15; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

//vector<double>
void gauss_elimination(vector<vector<double> > &a, int to)
{
	int n = a.size(), m = a[0].size();

	for(int col = 0, row = 0; col < to && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(abs(a[i][col]) > abs(a[sel][col]))
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { continue; }

		for(int i = 0; i < n; i++)
		{
			if(i == row) continue;
			double mult = a[i][col] / a[row][col];
			if(abs(mult) < eps) continue;
			for(int j = 0; j < m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	/*
	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}

	return ret;*/
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > c;

vector<vector<double> > mult(vector<vector<double> > &a, vector<vector<double> > &b)
{
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
		{
			c[i][j] = 0;
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];
		}

	return c;
}

void solve()
{
	vector<vector<double> > t(n * n, vector<double>(n * n + n, 0));
	vector<vector<double> > inital = t;
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			if(u == v) continue;
			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < n; i++)
		t[state(i, i)][n * n + i] = 1;

	gauss_elimination(t, n * n);
	vector<double> answer(n, 0);

	for(int i = 0; i < n; i++)
		answer[i] = t[state(a, b)][n * n + i] / t[state(a, b)][state(a, b)];

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[i] << " ";
	cout << endl;

	/*
	c = vector<vector<double> >(n * n, vector<double>(n * n, 0));
	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 15; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
	*/
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > mult(vector<vector<double> > a, vector<vector<double> > b)
{
	vector<vector<double> > c(n * n, vector<double>(n * n, 0));
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 10; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > mult(vector<vector<double> > a, vector<vector<double> > b)
{
	vector<vector<double> > c(n * n, vector<double>(n * n, 0));
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 30; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > c(n * n, vector<double>(n * n, 0));

vector<vector<double> > mult(vector<vector<double> > &a, vector<vector<double> > &b)
{
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
		{
			c[i][j] = 0;
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];
		}

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 15; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > c;

vector<vector<double> > mult(vector<vector<double> > &a, vector<vector<double> > &b)
{
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
		{
			c[i][j] = 0;
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];
		}

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	c = vector<vector<double> >(n * n, vector<double>(n * n, 0));
	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 15; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
const int MAXN = (1 << 20);
const double eps = 1e-9;

vector<double> gauss_elimination(vector<vector<double> > &a)
{
	int n = a.size(), m = a[0].size() - 1;
	vector<int> where(m, -1);

	for(int col = 0, row = 0; col < m && row < n; col++)
	{
		int sel = row;
		for(int i = row; i < n; i++)
			if(a[i][col] > a[sel][col])
				sel = i;

		swap(a[sel], a[row]);
		if(abs(a[row][col]) < eps) { where[row] = -1; continue; }
		where[col] = row;

		for(int i = row + 1; i < n; i++)
		{
			double mult = a[i][col] / a[row][col];
			for(int j = 0; j <= m; j++)
				a[i][j] -= a[row][j] * mult;
		}

		row++;
	}

	vector<double> ret(m, 0);
	for(int i = 0; i < m; i++)
		if(where[i] != -1)
			ret[i] = a[where[i]][m] / a[where[i]][i];

	/*
	for(int i = 0; i < n; i++)
	{
		double res = a[i][m];
		for(int j = 0; j < m; j++)
			res -= ret[j] * a[i][j];

		if(abs(res) > eps) return vector<double>();
	}*/

	return ret;
}

int n, m, a, b;
vector<int> adj[MAXN];
double p[MAXN];

void read()
{
	cin >> n >> m >> a >> b;
	a--; b--;
	for(int i = 0; i < m; i++)
	{
		int u, v;
		cin >> u >> v;
		u--; v--;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}

	for(int i = 0; i < n; i++)
	{
		cin >> p[i];
		adj[i].push_back(i);
	}
}

inline int state(int x, int y) { return x * n + y; }

double prob(int u, int v)
{
	if(u == v) return p[u];
	return (1.0 - p[u]) * (1.0 / (adj[u].size() - 1));
}

vector<vector<double> > mult(vector<vector<double> > a, vector<vector<double> > b)
{
	vector<vector<double> > c(n * n, vector<double>(n * n, 0));
	for(int i = 0; i < (int)a.size(); i++)
		for(int j = 0; j < (int)a[0].size(); j++)
			for(int k = 0; k < (int)b.size(); k++)
				c[i][j] += a[i][k] * b[k][j];

	return c;
}

void solve()
{
	/*
	vector<vector<double> > t(n * n + 1, vector<double>(n * n + 1, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			t[state(u, v)][state(u, v)] = 1;
			for(int a1: adj[u])
				for(int a2: adj[v])
					if(a1 != a2)
						t[state(u, v)][state(a1, a2)] -= prob(u, a1) * prob(v, a2);
		}

	t[n * n][state(a, b)] = 1;
	t[n * n][n * n] = 1;
	vector<double> answer = gauss_elimination(t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << answer[state(i, i)] << " ";
	cout << endl;
	*/

	vector<vector<double> > t(n * n, vector<double>(n * n, 0));
	for(int u = 0; u < n; u++)
		for(int v = 0; v < n; v++)
		{
			if(u == v)
			{
				t[state(u, v)][state(u, v)] = 1;
				continue;
			}

			for(int a1: adj[u])
				for(int a2: adj[v])
					t[state(u, v)][state(a1, a2)] += prob(u, a1) * prob(v, a2);
		}

	for(int i = 0; i < 20; i++)
		t = mult(t, t);

	for(int i = 0; i < n; i++)
		cout << setprecision(9) << fixed << t[state(a, b)][state(i, i)] << " ";
	cout << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	read();
	solve();
	return 0;
}


#include <cstdio>
#include <algorithm>
#define N 510
using namespace std;
struct edge
{
	int to,next;
}e[N*N*2];
int st[N*N*2],a,b,n,m,tot,x,y,s[N*N*2],ed[N*N*2];
double d[N],f[N][N],ans[N],sum,E[N*N*2],g[N],q[N],p[N];
int calc(int x,int y)
{
	return (x-1)*n+y;
}
void add(int x,int y)
{
	e[++tot].to=y;
	e[tot].next=st[x];
	st[x]=tot;
}
const double eps=1e-12;
int dcmp(double x)
{
    if (x<=eps&&x>=-eps) return 0;
    return (x>0)?1:-1;
}
void gauss()
{
    for (int i=1;i<=n*n;++i)
    {
        int num=i;
        for (int j=i+1;j<=n*n;++j)
            if (dcmp(f[num][i]-f[j][i])<0) num=j;
        if (num!=i)
        {
        	for (int j=1;j<=n*n;++j) swap(f[i][j],f[num][j]);
        	swap(g[i],g[num]);
		}
        for (int j=i+1;j<=n*n;++j)
            if (dcmp(f[j][i]))
            {
                double t=f[j][i]/f[i][i];
                for (int k=1;k<=n*n;++k) f[j][k]-=f[i][k]*t;
                g[j]-=g[i]*t;
            }
    }
    for (int i=n*n;i>=1;--i)
    {
        for (int j=i+1;j<=n*n;++j) g[i]-=f[i][j]*ans[j];
        ans[i]=g[i]/f[i][i];
    }
}
main()
{
	scanf("%d%d%d%d",&n,&m,&a,&b);
	for (int i=1;i<=m;i++)
		scanf("%d%d",&x,&y),
		add(x,y),add(y,x),
		d[x]++,d[y]++;
	for (int i=1;i<=n;i++)
		scanf("%lf",&p[i]),
		q[i]=(1-p[i])/d[i];
	for (int i=1;i<=n;i++)
		for (int j=1;j<=n;j++)
		{
			f[calc(i,j)][calc(i,j)]=1;
			if (i!=j) f[calc(i,j)][calc(i,j)]-=p[i]*p[j];
			for (int k=st[i];k;k=e[k].next)
				if (e[k].to!=j)
					f[calc(i,j)][calc(e[k].to,j)]=-q[e[k].to]*p[j];
			for (int k=st[j];k;k=e[k].next)
				if (e[k].to!=i)
					f[calc(i,j)][calc(i,e[k].to)]=-q[e[k].to]*p[i];
			for (int k=st[i];k;k=e[k].next)
				for (int l=st[j];l;l=e[l].next)
					if (e[k].to!=e[l].to)
						f[calc(i,j)][calc(e[k].to,e[l].to)]=-q[e[k].to]*q[e[l].to];
		}
	g[calc(a,b)]=1.0;
	gauss();
	for (int i=1;i<=n;i++)
		printf("%.6lf ",ans[calc(i,i)]);
}


#include <bits/stdc++.h>

using namespace std;

const int N=510;
const double EPS=1e-9;

int n,m,a,b;
int all;
double f[N][N],g[N];
int deg[N];
double p[N];
vector <int> graph[N];

double func(int x)
{
	return (1.0-p[x])/deg[x];
}

int idx(int x,int y)
{
	return x*n+y;
}

int main()
{
	scanf("%d %d %d %d",&n,&m,&a,&b);
	--a,--b;
	all=n*n;
	for(int i=0;i<m;++i)
	{
		int x,y;
		scanf("%d %d",&x,&y);
		--x,--y;
		graph[x].push_back(y);
		graph[y].push_back(x);
		++deg[x],++deg[y];
	}
	for(int i=0;i<n;++i) scanf("%lf",&p[i]);
	for(int xa=0;xa<n;++xa)
	{
		for(int ya=0;ya<n;++ya)
		{
			int cur=idx(xa,ya);
			f[cur][cur]=1.0;
			if(xa!=ya) f[cur][cur]-=p[xa]*p[ya];
			g[cur]=0.0;
			for(int ei=0;ei<graph[xa].size();++ei)
			{
				int xb=graph[xa][ei];
				if(xb==ya) continue;
				int from=idx(xb,ya);
				f[cur][from]=-func(xb)*p[ya];
			}
			for(int ej=0;ej<graph[ya].size();++ej)
			{
				int yb=graph[ya][ej];
				if(xa==yb) continue;
				int from=idx(xa,yb);
				f[cur][from]=-p[xa]*func(yb);
			}
			for(int ei=0;ei<graph[xa].size();++ei)
			{
				int xb=graph[xa][ei];
				for(int ej=0;ej<graph[ya].size();++ej)
				{
					int yb=graph[ya][ej];
					if(xb==yb) continue;
					int from=idx(xb,yb);
					f[cur][from]=-func(xb)*func(yb);
				}
			}
		}
	}
	g[idx(a,b)]=1.0;
	for(int i=0;i<all;++i)
	{
		int pivot=i;
		for(int j=i;j<all;++j)
		{
			if(fabs(f[pivot][i])<fabs(f[j][i])) pivot=i;
		}
		assert(fabs(f[pivot][i])>EPS);
		for(int t=0;t<n;++t) swap(f[pivot][t],f[i][t]);
		swap(g[pivot],g[i]);
		for(int j=0;j<all;++j)
		{
			if(i==j||fabs(f[j][i])<EPS) continue;
			double R=f[j][i]/f[i][i];
			for(int t=0;t<all;++t) f[j][t]-=R*f[i][t];
			g[j]-=R*g[i];
		}
	}
	for(int i=0;i<n;++i)
	{
		int id=idx(i,i);
		printf("%.8lf%c",g[id]/f[id][id]," \n"[i==n-1]);
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>

namespace wo_ming_bai_le
{
	const int N=24,M=N*N;
	const double eps=1e-9;

	inline bool fcmp(double a,double b){return std::abs(a-b)<eps;}

	int n,m,sx,sy;
	int tot;

	struct matrix
	{
		double s[M][M];
		void reset(){memset(s,0,sizeof(s));}
	};

	void turn_inv(matrix &A)
	{
		static double s[M][M],t[M][M];

		memcpy(s,A.s,sizeof(s));
		memset(t,0,sizeof(t));
		for(int i=1;i<=tot;i++)t[i][i]=1;

		int row=1,drow;
		for(int col=1;col<=tot;col++)
		{
			for(drow=row;fcmp(s[drow][col],0);drow++);
			if(drow>tot){printf("fuck\n");break;}

			if(drow!=row)for(int i=1;i<=tot;i++)std::swap(s[row][i],s[drow][i]),std::swap(t[row][i],t[drow][i]);

			for(int i=1;i<=tot;i++)
				if(i!=row && !fcmp(s[i][col],0))
				{
					double x=-s[i][col]/s[row][col];

					for(int j=1;j<=tot;j++)
						s[i][j]+=x*s[row][j],t[i][j]+=x*t[row][j];
				}

			double x=s[row][col];
			for(int i=1;i<=tot;i++)
				s[row][i]/=x,t[row][i]/=x;
			row++;
		}

		memcpy(A.s,t,sizeof(A.s));
	}

	int deg[N];
	bool G[N][N];
	double P[N];

#define id(x,y) ((x-1)*n+y)

	void solve()
	{
		scanf("%d%d%d%d",&n,&m,&sx,&sy);
		tot=n*n;
		for(int u,v;m--;)
		{
			scanf("%d%d",&u,&v);
			G[u][v]=G[v][u]=1;
			deg[u]++,deg[v]++;
		}
		for(int i=1;i<=n;i++)
			scanf("%lf",P+i);

		matrix A;A.reset();
		for(int i=1;i<=n;i++)
			for(int j=1;j<=n;j++)
				if(i==j)A.s[id(i,j)][id(i,j)]=1;
				else
				{
					int p=id(i,j);

					A.s[p][p]=P[i]*P[j]-1;

					for(int di=1;di<=n;di++)
						if(G[i][di])
							A.s[p][id(di,j)]=(1-P[i])/deg[i]*P[j];

					for(int dj=1;dj<=n;dj++)
						if(G[j][dj])
							A.s[p][id(i,dj)]=(1-P[j])/deg[j]*P[i];

					for(int di=1;di<=n;di++)
						for(int dj=1;dj<=n;dj++)
							if(G[i][di] && G[j][dj])
								A.s[p][id(di,dj)]=(1-P[i])*(1-P[j])/deg[i]/deg[j];
				}

//		for(int i=1;i<=tot;i++,printf("\n"))
//			for(int j=1;j<=tot;j++)printf("%.3lf ",A.s[i][j]);
//		printf("---------------------\n");

		turn_inv(A);

//		for(int i=1;i<=tot;i++,printf("\n"))
//			for(int j=1;j<=tot;j++)printf("%.3lf ",A.s[i][j]);
//		printf("---------------------\n");

		for(int i=1;i<=n;i++)
			printf("%.6lf ",A.s[id(sx,sy)][id(i,i)]);
		printf("\n");
	}

}

int main()
{
//	freopen("in","r",stdin);
	wo_ming_bai_le::solve();
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>

namespace wo_ming_bai_le
{
	const int N=22,M=N*N;
	const double eps=1e-8;

	inline bool fcmp(double a,double b){return std::abs(a-b)<eps;}

	int n,m,sx,sy;
	int tot;

	struct matrix
	{
		double s[M][M];
		void reset(){memset(s,0,sizeof(s));}
	};

	void turn_inv(matrix &A)
	{
		static double s[M][M],t[M][M];

		memcpy(s,A.s,sizeof(s));
		memset(t,0,sizeof(t));
		for(int i=1;i<=tot;i++)t[i][i]=1;

		int row=1,drow;
		for(int col=1;col<=tot;col++)
		{
			for(drow=row;fcmp(s[drow][col],0);drow++);
			if(drow>tot){printf("fuck\n");break;}

			if(drow!=row)for(int i=1;i<=tot;i++)std::swap(s[row][i],s[drow][i]),std::swap(t[row][i],t[drow][i]);

			for(int i=1;i<=tot;i++)
				if(i!=row && !fcmp(s[i][col],0))
				{
					double x=-s[i][col]/s[row][col];

					for(int j=1;j<=tot;j++)
						s[i][j]+=x*s[row][j],t[i][j]+=x*t[row][j];
				}

			double x=s[row][col];
			for(int i=1;i<=tot;i++)
				s[row][i]/=x,t[row][i]/=x;
			row++;
		}

		memcpy(A.s,t,sizeof(A.s));
	}

	int deg[N];
	bool G[N][N];
	double P[N];

#define id(x,y) ((x-1)*n+y)

	void solve()
	{
		scanf("%d%d%d%d",&n,&m,&sx,&sy);
		tot=n*n;
		for(int u,v;m--;)
		{
			scanf("%d%d",&u,&v);
			G[u][v]=G[v][u]=1;
			deg[u]++,deg[v]++;
		}
		for(int i=1;i<=n;i++)
			scanf("%lf",P+i);

		matrix A;A.reset();
		for(int i=1;i<=n;i++)
			for(int j=1;j<=n;j++)
				if(i==j)A.s[id(i,j)][id(i,j)]=1;
				else
				{
					int p=id(i,j);

					A.s[p][p]=P[i]*P[j]-1;

					for(int di=1;di<=n;di++)
						if(G[i][di])
							A.s[p][id(di,j)]=(1-P[i])/deg[i]*P[j];

					for(int dj=1;dj<=n;dj++)
						if(G[j][dj])
							A.s[p][id(i,dj)]=(1-P[j])/deg[j]*P[i];

					for(int di=1;di<=n;di++)
						for(int dj=1;dj<=n;dj++)
							if(G[i][di] && G[j][dj])
								A.s[p][id(di,dj)]=(1-P[i])*(1-P[j])/deg[i]/deg[j];
				}

//		for(int i=1;i<=tot;i++,printf("\n"))
//			for(int j=1;j<=tot;j++)printf("%.3lf ",A.s[i][j]);
//		printf("---------------------\n");

		turn_inv(A);

//		for(int i=1;i<=tot;i++,printf("\n"))
//			for(int j=1;j<=tot;j++)printf("%.3lf ",A.s[i][j]);
//		printf("---------------------\n");

		for(int i=1;i<=n;i++)
			printf("%.10lf ",A.s[id(sx,sy)][id(i,i)]);
		printf("\n");
	}

}

int main()
{
//	freopen("in","r",stdin);
	wo_ming_bai_le::solve();
	return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define LL long long
#define pii pair <int,int>
#define fi first
#define se second
#define pb push_back
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

vector <double> gauss(vector <vector <double> > vv,int n)
{
	vector <double> ret(0);
	rep(i,n)
	{
		int pos=i;
		for(int j=i+1;j<n;j++) if(abs(vv[pos][i])<abs(vv[j][i])) pos=j;
		if(vv[pos][i]==0) return ret;
		swap(vv[i],vv[pos]);
		for(int j=i+1;j<n+1;j++) vv[i][j]/=vv[i][i];
		vv[i][i]=1;
		rep(j,n)
		{
			if(j==i) continue;
			for(int k=i+1;k<n+1;k++) vv[j][k]-=vv[j][i]*vv[i][k];
			vv[j][i]=0;
		}
	}
	rep(i,n) ret.pb(vv[i][n]);
	return ret;
}

int n,m,a,b,x,y,num[30][30];
double xx,p[30][30];
vector <int> g[30];
vector <vector <double> > v(1000,vector <double>(1000));

int main()
{
	cin>>n>>m>>a>>b;
	if(a>b) swap(a,b);
	rep(i,m)
	{
		cin>>x>>y;
		g[x].pb(y);
		g[y].pb(x);
	}
	repn(i,n)
	{
		cin>>xx;
		p[i][i]=xx;
		xx=1-xx;
		rep(j,g[i].size()) p[i][g[i][j]]=xx/g[i].size();
	}
	if(n==1)
	{
		puts("1");
		return 0;
	}
	int tmp=0;
	repn(i,n) repn(j,i-1) num[j][i]=tmp++;
	repn(i,n)
	{
		rep(j,995) rep(k,995) v[j][k]=0;
		repn(j,n)
		{
			repn(j2,j-1)
			{
				v[num[j2][j]][num[j2][j]]-=1;
				repn(k,n) repn(k2,n)
				{
					int r=k,r2=k2;
					if(r>r2) swap(r,r2);
					if(k!=k2) v[num[j2][j]][num[r][r2]]+=p[j2][k]*p[j][k2];
					else if(k==i) v[num[j2][j]][tmp]-=p[j2][k]*p[j][k2];
				}
			}
		}
		vector <double> res=gauss(v,tmp);
		if(a==b) cout<<(a==i ? 1:0)<<' ';
		else if(res.size()==0) cout<<"0 ";
		else printf("%.10lf ",res[num[a][b]]);
	}
	cout<<endl;
	return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define LL long long
#define pii pair <int,int>
#define fi first
#define se second
#define pb push_back
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

vector <double> gauss(vector <vector <double> > vv,int n)
{
	vector <double> ret(0);
	rep(i,n)
	{
		int pos=i;
		for(int j=i+1;j<n;j++) if(abs(vv[pos][i])<abs(vv[j][i])) pos=j;
		if(vv[pos][i]==0) return ret;
		swap(vv[i],vv[pos]);
		for(int j=i+1;j<n+1;j++) vv[i][j]/=vv[i][i];
		vv[i][i]=1;
		rep(j,n)
		{
			if(j==i) continue;
			for(int k=i+1;k<n+1;k++) vv[j][k]-=vv[j][i]*vv[i][k];
			vv[j][i]=0;
		}
	}
	rep(i,n) ret.pb(vv[i][n]);
	return ret;
}

int n,m,a,b,x,y,num[30][30];
double xx,p[30][30];
vector <int> g[30];
vector <vector <double> > v(1000,vector <double>(1000));

int main()
{
	cin>>n>>m>>a>>b;
	if(a>b) swap(a,b);
	rep(i,m)
	{
		cin>>x>>y;
		g[x].pb(y);
		g[y].pb(x);
	}
	repn(i,n)
	{
		cin>>xx;
		p[i][i]=xx;
		xx=1-xx;
		rep(j,g[i].size()) p[i][g[i][j]]=xx/g[i].size();
	}
	int tmp=0;
	repn(i,n) repn(j,i-1) num[j][i]=tmp++;
	repn(i,n)
	{
		rep(j,995) rep(k,995) v[j][k]=0;
		repn(j,n)
		{
			repn(j2,j-1)
			{
				v[num[j2][j]][num[j2][j]]-=1;
				repn(k,n) repn(k2,n)
				{
					int r=k,r2=k2;
					if(r>r2) swap(r,r2);
					if(k!=k2) v[num[j2][j]][num[r][r2]]+=p[j2][k]*p[j][k2];
					else if(k==i) v[num[j2][j]][tmp]-=p[j2][k]*p[j][k2];
				}
			}
		}
		vector <double> res=gauss(v,tmp);
		if(res.size()==0) printf("0\n");
		else printf("%.10lf\n",res[num[a][b]]);
	}
	return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define LL long long
#define pii pair <int,int>
#define fi first
#define se second
#define pb push_back
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

vector <double> gauss(vector <vector <double> > vv,int n)
{
	vector <double> ret(0);
	rep(i,n)
	{
		int pos=i;
		for(int j=i+1;j<n;j++) if(abs(vv[pos][i])<abs(vv[j][i])) pos=j;
		if(vv[pos][i]==0) return ret;
		swap(vv[i],vv[pos]);
		for(int j=i+1;j<n+1;j++) vv[i][j]/=vv[i][i];
		vv[i][i]=1;
		rep(j,n)
		{
			if(j==i) continue;
			for(int k=i+1;k<n+1;k++) vv[j][k]-=vv[j][i]*vv[i][k];
			vv[j][i]=0;
		}
	}
	rep(i,n) ret.pb(vv[i][n]);
	return ret;
}

int n,m,a,b,x,y,num[30][30];
double xx,p[30][30];
vector <int> g[30];
vector <vector <double> > v(1000,vector <double>(1000));

int main()
{
	cin>>n>>m>>a>>b;
	if(a>b) swap(a,b);
	rep(i,m)
	{
		cin>>x>>y;
		g[x].pb(y);
		g[y].pb(x);
	}
	repn(i,n)
	{
		cin>>xx;
		p[i][i]=xx;
		xx=1-xx;
		rep(j,g[i].size()) p[i][g[i][j]]=xx/g[i].size();
	}
	if(n==1)
	{
		puts("1");
		return 0;
	}
	int tmp=0;
	repn(i,n) repn(j,i-1) num[j][i]=tmp++;
	repn(i,n)
	{
		rep(j,995) rep(k,995) v[j][k]=0;
		repn(j,n)
		{
			repn(j2,j-1)
			{
				v[num[j2][j]][num[j2][j]]-=1;
				repn(k,n) repn(k2,n)
				{
					int r=k,r2=k2;
					if(r>r2) swap(r,r2);
					if(k!=k2) v[num[j2][j]][num[r][r2]]+=p[j2][k]*p[j][k2];
					else if(k==i) v[num[j2][j]][tmp]-=p[j2][k]*p[j][k2];
				}
			}
		}
		vector <double> res=gauss(v,tmp);
		if(res.size()==0) cout<<"0 ";
		else printf("%.10lf ",res[num[a][b]]);
	}
	cout<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<int, int>
#define mk make_pair
const int N = 1e6 + 10;
const int mod = 1e9 + 7;

const double eps = 1e-6;
vector<double> Gauss(vector<vector<double>> a, int n)
{
    for (int i = 1, w = 1; i <= n && w <= n; w++, i++)
    {
        int r = w;
        for (int j = w + 1; j <= n; j++)
            if (fabs(a[j][i]) > fabs(a[r][i]))
                r = j;
        // if (fabs(a[r][i]) <= eps)
        // {
        //     puts("No Solution");
        //     return;
        // }
        if (r != w)
            for (int j = 1; j <= n + 1; j++)
                swap(a[r][j], a[w][j]);
        for (int k = 1; k <= n; k++)
        {
            if (k != w)
            {
                for (int j = n + 1; j >= w; j--)
                    a[k][j] -= 1.00 * a[k][i] / a[w][i] * a[w][j];
            }
        }
    }
    vector<double> ans(n + 1);

    for (int i = 1; i <= n; i++)
        ans[i] = a[i][n + 1] / a[i][i];
    return ans;
}
int main()
{
    int n, m, A, B;
    cin >> n >> m >> A >> B;
    vector<vector<int>> mp(n + 1, vector<int>(n + 1)), id(n + 1, vector<int>(n + 1));
    vector<double> p(n + 1), q(n + 1);
    vector<int> d(n + 1);
    int cnt = 0;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            id[i][j] = ++cnt;
    for (int i = 1; i <= m; i++)
    {
        int u, v;
        cin >> u >> v;
        mp[u][v] = mp[v][u] = 1;
        d[u]++;
        d[v]++;
    }
    for (int i = 1; i <= n; i++)
        cin >> p[i];
    for (int i = 1; i <= n; i++)
        q[i] = (1 - p[i]) / d[i];

    vector<vector<double>> a(cnt + 1, vector<double>(cnt + 2));
    a[id[A][B]][cnt + 1] = 1;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= n; j++)
        {
            int o = id[i][j];
            a[o][o] = 1;
            if (i != j)
                a[o][o] = 1 - p[i] * p[j];
            for (int u = 1; u <= n; u++)
                if (u != i && mp[u][j])
                    a[o][id[i][u]] = -p[i] * q[j];
            for (int v = 1; v <= n; v++)
                if (v != j && mp[v][i])
                    a[o][id[v][j]] = -p[j] * q[i];
            for (int u = 1; u <= n; u++)
                for (int v = 1; v <= n; v++)
                    if (v != u && mp[u][j] && mp[v][i])
                        a[o][id[v][u]] = -q[i] * q[j];
        }
    }
    // for (int i = 1; i <= cnt; i++)
    // {
    //     for (int j = 1; j <= cnt + 1; j++)
    //         cout << a[i][j] << " ";
    //     cout << endl;
    // }
    auto ans = Gauss(a, cnt);
    for (int i = 1; i <= n; i++)
        printf("%.10lf ", ans[id[i][i]]);
    printf("\n");
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii pair<int, int>
#define mk make_pair
const int N = 1e6 + 10;
const int mod = 1e9 + 7;

const double eps = 1e-6;
vector<double> Gauss(vector<vector<double>> a, int n)
{
    for (int i = 1, w = 1; i <= n && w <= n; w++, i++)
    {
        int r = w;
        for (int j = w + 1; j <= n; j++)
            if (fabs(a[j][i]) > fabs(a[r][i]))
                r = j;
        // if (fabs(a[r][i]) <= eps)
        // {
        //     puts("No Solution");
        //     return;
        // }
        if (r != w)
            for (int j = 1; j <= n + 1; j++)
                swap(a[r][j], a[w][j]);
        for (int k = 1; k <= n; k++)
        {
            if (k != w)
            {
                for (int j = n + 1; j >= w; j--)
                    a[k][j] -= 1.00 * a[k][i] / a[w][i] * a[w][j];
            }
        }
    }
    vector<double> ans(n + 1);

    for (int i = 1; i <= n; i++)
        ans[i] = a[i][n + 1] / a[i][i];
    return ans;
}
int main()
{
    int n, m, A, B;
    cin >> n >> m >> A >> B;
    vector<vector<int>> mp(n + 1, vector<int>(n + 1)), id(n + 1, vector<int>(n + 1));
    vector<double> p(n + 1), q(n + 1);
    vector<int> d(n + 1);
    int cnt = 0;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            id[i][j] = ++cnt;
    for (int i = 1; i <= m; i++)
    {
        int u, v;
        cin >> u >> v;
        mp[u][v] = mp[v][u] = 1;
        d[u]++;
        d[v]++;
    }
    for (int i = 1; i <= n; i++)
        cin >> p[i];
    for (int i = 1; i <= n; i++)
        q[i] = (1 - p[i]) / (d[i] * 1.00);

    vector<vector<double>> a(cnt + 1, vector<double>(cnt + 2));
    a[id[A][B]][cnt + 1] = 1;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= n; j++)
        {
            int o = id[i][j];
            a[o][o] = 1;
            if (i != j)
                a[o][o] = 1 - p[i] * p[j];
            for (int u = 1; u <= n; u++)
                if (u != i && mp[u][j])
                    a[o][id[i][u]] = -p[i] * q[u];
            for (int v = 1; v <= n; v++)
                if (v != j && mp[v][i])
                    a[o][id[v][j]] = -p[j] * q[v];
            for (int u = 1; u <= n; u++)
                for (int v = 1; v <= n; v++)
                    if (v != u && mp[u][j] && mp[v][i])
                        a[o][id[v][u]] = -q[u] * q[v];
        }
    }
    // for (int i = 1; i <= cnt; i++)
    // {
    //     for (int j = 1; j <= cnt + 1; j++)
    //         cout << a[i][j] << " ";
    //     cout << endl;
    // }
    auto ans = Gauss(a, cnt);
    for (int i = 1; i <= n; i++)
        printf("%.10lf ", ans[id[i][i]]);
    printf("\n");
}


import java.util.*;
public class Museum
{
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);

		int n = in.nextInt();
		int m = in.nextInt();
		int a = in.nextInt() - 1;
		int b = in.nextInt() - 1;

		ArrayList<Integer>[] adj = new ArrayList[n];
		for(int x = 0; x < adj.length; x++)
		{
			adj[x] = new ArrayList<Integer>();
		}

		for(int y = 0; y < m; y++)
		{
			int u = in.nextInt() - 1;
			int v = in.nextInt() - 1;
			adj[u].add(v);
			adj[v].add(u);
		}

		double[] prob = new double[n];
		for(int x = 0; x < n; x++)
		{
			prob[x] = in.nextDouble();
		}

		double[][] matrix = new double[n * n][n * n + n];
		for(int y = 0; y < n; y++)
		{
			for(int z = 0; z < n; z++)
			{
				if(y == z)
				{
					matrix[y * n + z][y * n + z] = 1.0;
					matrix[y * n + z][n * n + y] = 1.0;
				}
				else
				{
					matrix[y * n + z][y * n + z] = prob[y] * prob[z] - 1.0;

					for(int c : adj[y])
					{
						matrix[y * n + z][c * n + z] = ((1.0 - prob[y]) / adj[y].size()) * prob[z];

						for(int d : adj[z])
						{
							matrix[y * n + z][c * n + d] = ((1.0 - prob[y]) / adj[y].size()) * ((1.0 - prob[z]) / adj[z].size());
						}
					}

					for(int e : adj[z])
					{
						matrix[y * n + z][y * n + e] = prob[y] * ((1.0 - prob[z]) / adj[z].size());
					}
				}
			}
		}

		gaussJordan(matrix);

		for(int f = 0; f < n; f++)
		{
			if(f > 0)
			{
				System.out.print(" ");
			}

			System.out.print(matrix[a * n + b][n * n + f]);
		}

		System.out.println();
	}

	public static void gaussJordan(double[][] matrix)
	{
		int row = 0;
		for(int a = 0; a < matrix[0].length && row < matrix.length; a++)
		{
			double max = Double.NEGATIVE_INFINITY;
			int maxIndex = -1;
			for(int b = row; b < matrix.length; b++)
			{
				if(Math.abs(matrix[b][a]) > max)
				{
					max = Math.abs(matrix[b][a]);
					maxIndex = b;
				}
			}

			if(max < 1E-9)
			{
				continue;
			}

			double[] temp = matrix[row];
			matrix[row] = matrix[maxIndex];
			matrix[maxIndex] = temp;

			for(int c = 0; c < matrix.length; c++)
			{
				if(c != row)
				{
					double mult = -matrix[c][a] / matrix[row][a];
					for(int d = a; d < matrix[0].length; d++)
					{
						matrix[c][d] += mult * matrix[row][d];
					}
				}
			}

			double mult = 1 / matrix[row][a];
			for(int e = a; e < matrix[0].length; e++)
			{
				matrix[row][e] *= mult;
			}

			row++;
		}
	}
}