#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
const ll MAX = 1001001;
const ll MOD = 1000000007;
const double pi = 2.0 * asin(1.0);
ll dx[4] = {1, 0, -1, 0};
ll dy[4] = {0, 1, 0, -1};
typedef vector<ll> vec;
typedef vector<vec> mat;
//A*Bの計算
mat mul(mat &A, mat &B)
{
    mat C(A.size(), vec(B[0].size()));
    for (ll i = 0; i < A.size(); i++)
    {
        for (ll k = 0; k < B.size(); k++)
        {
            for (ll j = 0; j < B[0].size(); j++)
            {
                C[i][j] = (C[i][j] + A[i][k] * B[k][j]) % MOD;
            }
        }
    }
    return C;
}

//A^nの計算
mat pow(mat A, ll n)
{
    mat B(A.size(), vec(A.size()));
    for (ll i = 0; i < A.size(); i++)
    {
        B[i][i] = 1;
    }
    while (n > 0)
    {
        if (n & 1)
            B = mul(B, A);
        A = mul(A, A);
        n >>= 1;
    }
    return B;
}
ll modpow(ll a, ll n, ll mod)
{
    ll res = 1;
    while (n > 0)
    {
        if (n & 1)
            res = res * a % mod;
        a = a % mod * (a % mod) % mod;
        n >>= 1;
    }
    return res;
}
int main()
{
    ll n, m, k;
    cin >> n >> m >> k;
    vector<ll> a(n);
    rep(i, n)
    {
        cin >> a[i];
    }
    vector<ll> x(m), y(m);
    vector<ll> d[n];
    rep(i, m)
    {
        cin >> x[i] >> y[i];
        x[i]--;
        y[i]--;
        d[x[i]].emplace_back(y[i]);
        d[y[i]].emplace_back(x[i]);
    }
    mat A(n, vec(n));
    rep(i, n)
    {
        rep(j, d[i].size())
        {
            A[i][d[i][j]] = modpow(2 * m, MOD - 2, MOD);
        }
        A[i][i] = (2 * m - d[i].size()) * modpow(2 * m, MOD - 2, MOD) % MOD;
    }
    A = pow(A, k);
    vector<ll> ans(n);
    rep(i, n)
    {
        rep(j, n)
        {
            ans[i] = (ans[i] + a[j] * A[j][i]) % MOD;
        }
    }
    rep(i, n)
    {
        cout << ans[i] << endl;
    }
}
#include <bits/stdc++.h>
using namespace std;

int A,B;
long long K, dp[61][31];

int main() {
    scanf("%d %d %lld", &A, &B, &K);
    memset(dp,0,sizeof(dp));
    for (int i = 0; i <= A+B; ++i) for (int j = 0; j <= A && j <= i; ++j) {
        if (j == 0) dp[i][j] = 1;
        else dp[i][j] = dp[i-1][j] + dp[i-1][j-1];
    }
    int a = A;
    for (int i = A+B; i > 0; --i) {
        if (a != 0 && dp[i-1][a-1] >= K) {
            printf("a");
            a--;
        }
        else {
            printf("b");
            K -= dp[i-1][a-1];
        }
    }

    return 0;
}
