#include<bits/stdc++.h>
#define LL long long
#define rint register int
#define LB lower_bound
#define UB upper_bound
#define MS(x,y) memset(x,y,sizeof(x))
#define rep(i,a,b) for(rint i=a,i##end=b;i<=i##end;++i)
#define drep(i,a,b) for(rint i=a,i##end=b;i>=i##end;--i)
#define cms printf("%.2lf\n",(&o2-&o1)/1024.0/1024);
using namespace std;bool o1;
char IO;
inline int Rd(){
	int _s_=0;bool _f_=0;
	while(!isdigit(IO=getchar()))
		(IO=='-')&&(_f_=1);
	do _s_=(_s_<<1)+(_s_<<3)+(IO^48);
	while(isdigit(IO=getchar()));
	return _f_?-_s_:_s_;
}
const int P=1e9+7,n2=5e8+4;
int n,m,k,n2m,a1,b1,in[104];
void cmod(int &x){
	x>=P&&(x-=P);
}
int ksm(int x){
	int rst=1;
	for(rint y=P-2;y;y>>=1,x=1ll*x*x%P)
		(y&1)&&(rst=1ll*rst*x%P);
	return rst;
}
struct node{
	int a[105][105];
	node(){MS(a,0);}
	node operator * (const node &_) const{
		node rst;
		rep(i,1,n)
			rep(j,1,n)
				rep(l,1,n)
					cmod(rst.a[i][j]+=1ll*a[i][l]*_.a[l][j]%P);
		return rst;
	}
}st,nw;
bool o2;int main(){
	n=Rd(),m=Rd(),k=Rd();
	n2m=1ll*ksm(m)*n2%P;
	rep(i,1,n)
		st.a[1][i]=Rd();
	rep(i,1,m){
		in[a1=Rd()]++,in[b1=Rd()]++;
		nw.a[a1][b1]=nw.a[b1][a1]=n2m;
	}
	rep(i,1,n)
		cmod(nw.a[i][i]=P+1-1ll*in[i]*n2m%P);
	rep(i,0,29){
		if(k&(1<<i))
			st=st*nw;
		nw=nw*nw;
	}
	rep(i,1,n)
		printf("%d\n",st.a[1][i]);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endll "\n"
#pragma GCC optimize(1)
#pragma GCC optimize(2)
#define ull unsigned long long
#define rep(i,b) for(int i=0;i<b;i++)
#define For(i, a, b) for(int i=a;i<=b;i++)
#define Rof(i, a, b) for(int i=a;i>=b;i--)
#define rest(a, b) memset(a,b, sizeof(a));
#define recopy(a, b) memcpy(b, a, sizeof(a));
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
int gcd(int a, int b) {while (b ^= a ^= b ^= a %= b);return a;}//最大公约数
ll gcd(ll a, ll b) {while (b ^= a ^= b ^= a %= b);return a;}
const int inf = 0x3f3f3f3f;
const int mod = 1e9+7;
const int N=1e5+50;
const int maxx=1e7;

int main(){
    int x,y,z;
    cin>>x>>y>>z;
    int d=y*z/x;
    if((y*z)%x==0)  d--;
    cout<<d<<endl;
    return 0;
}
