#include <bits/stdc++.h>          
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repp(i, st, en) for (ll i = (ll)st; i < (ll)(en); i++)
#define repm(i, st, en) for (ll i = (ll)st; i >= (ll)(en); i--)
#define all(v) v.begin(), v.end()
void chmax(ll &x, ll y) {x = max(x,y);}
void chmin(ll &x, ll y) {x = min(x,y);}
void Yes() {cout << "Yes" << endl; exit(0);}
void No() {cout << "No" << endl; exit(0);}
template<class in_Cout> void Cout(in_Cout x) {cout << x << endl; exit(0);}
template<class in_vec_cout>
void vec_cout(vector<in_vec_cout> vec) {
    for (in_vec_cout res : vec) {cout << res << " ";}
    cout << endl;
}

const ll inf = 1e18;
const ll mod = 1e9 + 7;

using matrix = vector<vector<ll>>;

ll powmodp(ll x, ll n) {
    if (n==0) return 1;
    if (n%2) return x * powmodp(x,n-1) % mod;
    ll res = powmodp(x,n/2);
    return res * res % mod;
}

ll inv(ll x) {return powmodp(x,mod-2);}

ll N, M, K;
vector<ll> A, G[110];
ll p, half;

matrix E(ll n) {
    matrix res(n,vector<ll>(n));
    rep(i,n) res[i][i] = 1;
    return res;
}

void addmodp(ll &x, ll y) {x = (x + y) % mod;}

matrix prodmatrix(matrix x, matrix y) {
    ll H = x.size(), W = y[0].size(), sz = y.size();
    matrix res(H,vector<ll>(W));
    rep(i,H) rep(j,W) rep(k,sz) {
        addmodp(res[i][j], x[i][k] * y[k][j] % mod);
    }
    return res;
}
vector<ll> prodmatrix(matrix x, vector<ll> y) {
    matrix z(y.size(),vector<ll>(1));
    rep(i,y.size()) z[i][0] = y[i];
    matrix tmp = prodmatrix(x,z);
    vector<ll> res(tmp.size());
    rep(i,tmp.size()) res[i] = tmp[i][0];
    return res;
}
vector<ll> prodmatrix(vector<ll> x, matrix y) {
    matrix z(1,vector<ll>(x.size()));
    rep(i,x.size()) z[0][i] = x[i];
    matrix tmp = prodmatrix(z,y);
    vector<ll> res(tmp[0].size());
    rep(i,tmp[0].size()) res[i] = tmp[0][i];
    return res;
}

matrix powmodp(matrix x, ll n) {
    if (n==0) return E(x.size());
    if (n%2) return prodmatrix(x,powmodp(x,n-1));
    matrix res = powmodp(x,n/2);
    return prodmatrix(res,res);
}

void init() {
    cin >> N >> M >> K;
    A.resize(N);
    rep(i,N) cin >> A[i];
    rep(i,M) {
        ll x, y; cin >> x >> y;
        x--; y--;
        G[x].push_back(y);
        G[y].push_back(x);
    }
    p = inv(M);
    half = inv(2);
}

int main() {
    init();
    matrix mat(N,vector<ll>(N));
    rep(i,N) {
        ll cnt = G[i].size();
        for (ll j : G[i]) mat[j][i] = p * half % mod;
        ll q = cnt * p % mod;
        q = q * half % mod;
        mat[i][i] = (1 + mod - q) % mod;
    }
    matrix F = powmodp(mat,K);
    
    vector<ll> res = prodmatrix(A,F);
    for (ll ans : res) cout << ans << endl;
}
#include <bits/stdc++.h>
using namespace std;

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#define F first
#define S second
#define all(x) begin(x), end(x)
#define allr(x) rbegin(x), rend(x)
using ll = long long;
using ull = unsigned long long;
using ld = long double;
constexpr ll INF = 2e18;
constexpr ld EPS = 1e-9;
constexpr int MOD = 998244353;
#define int long long

// Custom hash map
struct custom_hash
{
	static uint64_t splitmix64(uint64_t x)
	{
		// http://xorshift.di.unimi.it/splitmix64.c
		x += 0x9e3779b97f4a7c15;
		x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
		x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
		return x ^ (x >> 31);
	}

	size_t operator()(uint64_t x) const
	{
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x + FIXED_RANDOM);
	}
};
// Use int type for keys
template <typename T1, typename T2>
using safe_map = unordered_map<T1, T2, custom_hash>;

// Operator overloads
// cin >> pair<T1, T2>
template<typename T1, typename T2>
istream& operator>>(istream &istream, pair<T1, T2> &p)
{
    istream >> p.first >> p.second;
    return istream;
}
// cin >> vector<T>
template<typename T>
istream& operator>>(istream &istream, vector<T> &v)
{
    for (auto &it : v) cin >> it;
    return istream;
}
// cout << pair<T1, T2>
template<typename T1, typename T2>
ostream& operator<<(ostream &ostream, const pair<T1, T2> &p)
{
    ostream << p.first << " " << p.second;
    return ostream;
}
// cout << vector<T>
template<typename T>
ostream& operator<<(ostream &ostream, const vector<T> &c)
{
    for (auto &it : c) cout << it << " ";
    return ostream;
}

// Utility functions
template <typename T>
void print(T &&t) 
{ 
    cout << t << "\n"; 
}
template <typename T, typename... Args>
void print(T &&t, Args &&... args)
{
	cout << t << " ";
	print(forward<Args>(args)...);
}

template <typename T>
int32_t size_i(T &container) { return static_cast<int32_t>(container.size()); }

// Mathematical functions
int GCD(int a, int b)
{
	if (!b) return a;
	return GCD(b, a % b);
}
int LCM(int a, int b)
{
	return (a * b) / GCD(a, b);
}
int modpow(ll x, int n, int m = MOD) {
    ll res = 1;
    while (n > 0) 
	{
        if (n & 1)
            res = (res * x) % m;
        x = (x * x) % m;
        n >>= 1;
    }
    return res;
}

int binpow(int x, int n) {
    int res = 1;
    while (n > 0) 
	{
        if (n & 1)
            res = res * x;
        x = (x * x);
        n >>= 1;
    }
    return res;
}
// @param m should be prime
int modinv(int x, int m = MOD)
{   
	return modpow(x, m - 2, m);
}

// Flags to use: -std=c++17 -O2 -Wshadow -DLOCAL_PROJECT -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -fsanitize=address -fsanitize=undefined
////////////////////////////////// START CODE HERE //////////////////////////////////

void preSolve() 
{
}

void solve(int tc)
{
    int r, x, y;
    cin >> r >> x >> y;
    ld d = sqrtl((ld)x * x + y * y);
    int di = (int)d;
    if (abs(di - d) <= 1e-6 && di % r == 0)
        return void(print(di / r));
    int ans = d/ r;
    ans--;
    ans = max(0LL, ans);

    print(ans + 2);
}  

int32_t main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(0);
    cout << setprecision(12) << fixed;

    preSolve();
    int tests = 1;
    // cin >> tests;
    for (int t = 1; t <= tests; t++)
        solve(t);
    return 0;
}