#include <bits/stdc++.h>
using namespace std;

# define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
# define cases cin >> tests; while(tests--)
# define int long long
# define ch cout << "no rest for the wicked\n\n";
# define ch1(x) cout << '\n' << #x" : " << x << '\n';
# define ch2(x, y) cout << '\n' <<  #x" : " << x << " || " << #y" : " << y << '\n';
# define lcm(a, b) (((a) * (b))/__gcd(a, b))
# define fore(i, n) for(auto i = 0; i < n; i++)

int powa(int x, int y, int p)
{
    int res = 1;      // Initialize result
 
    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = ((res % p) * (x % p)) % p;
 
        // y must be even now
        y = y>>1; // y = y/2
        x = ((x % p) * (x % p)) % p;
    }
    return res % p;
}

void solve()
{
    int n, a, b, k;
    cin >> n >> a >> b >> k;
    string str;
    cin >> str;
    int ans = 0;
    int jj = 1000000009;
    for(int i = 0; i < min(k, n+1); i++)
    {
        // ch1(str[i])
        if(str[i] == '+')
        {
            ans += ((powa(a, n-i, jj) % jj) * (powa(b, i, jj) % jj));
        }
        else
        {
            ans -= ((powa(a, n-i, jj) % jj) * (powa(b, i, jj) % jj));
        }
    }
    // cout << ans << endl;
    if(k == n+1)
    {
        int num = ans;
        while(num < 0)
        {
            num += 1000000009;
        }
        cout << num % 1000000009;
        return;
    }
    // ans += (((ans * pow(b, k)) / pow(a, k)) * ((n+1) / k));
    int rat = powa(b, k, jj) / powa(a, k, jj);
    int series = n+1;
    series /= k;
    ans = ((((ans % jj) * ((powa(rat, series, jj))%jj) % jj) - 1) / (rat - 1));
    // cout << ans % (1000000009);
    // cout << ans - (ans / 1000000009);
    int num = ans;
    while(num < 0)
    {
        num += 1000000009;
    }
    cout << num % 1000000009;
}

signed main()
{
    fast;
    int tests = 1;
    
    // cases
    solve();
    
    return 0;
}