#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;

using ll = long long int;

const ll INF = (ll)(1e10 + 5);

const ll MAX = (ll)(2e5 + 5);
const ll mult = (ll)(1e4);

double xd, yd, rd;

ll x, y, r;

bool check(ll next, ll width_2_pow) {
  return next * next <= width_2_pow;
}

ll mod_floor(ll right, ll mod) {
  if (right >= 0) {
    return right - (right % mod);
  } else {
    return right - (right % mod) - ((right % mod) == 0LL ? 0LL : mod);
  }
}

ll mod_ceil(ll left, ll mod) {
  if (left >= 0) {
    return left - (left % mod) + ((left % mod) == 0LL ? 0LL : mod);
  } else {
    return left - (left % mod);
  }
}

ll count_for(ll length) {
  ll width_2_pow = r * r - length * length;

  ll ok = 0LL;
  ll ng = MAX * mult;

  while (abs(ok - ng) > 1) {
    ll next = (ok + ng) / 2LL;
    if (check(next, width_2_pow))
      ok = next;
    else
      ng = next;
  }

  ll left = mod_ceil(x - ok, mult);
  ll right = mod_floor(x + ok, mult);

  return (right - left) / mult + 1LL;
}

int main(void) {
  // Here your code !
  scanf("%lf %lf %lf", &xd, &yd, &rd);

  x = (ll)(round(xd * (double)(mult)));
  y = (ll)(round(yd * (double)(mult)));
  r = (ll)(round(rd * (double)(mult)));

  ll bottom = (ll)(ceil(yd - rd)) * mult;
  ll top = (ll)(floor(yd + rd)) * mult;

  // printf("%lld, %lld\n", bottom, top);

  ll ans = 0LL;

  for (ll i = bottom; i <= top; i += mult) {
    // printf("i: %lld - ", i);
    ans += count_for(abs(y - i));
  }

  printf("%lld\n", ans);

  return 0;
}
