#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
ll modularExponentiation(ll x, ll n, ll mod) {
  x %= mod;
  ll y = 1;
  for (; n > 0; n >>= 1, x = (x * x) % mod)
    if (n & 1) y = (y * x) % mod;
  return y;
}
const ll MOD = 9 + (ll)1e9;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  ll n, a, b, k;
  cin >> n >> a >> b >> k;
  char sg[k];
  cin >> sg;
  ll terms = (n + 1) / k;
  ll r = (b * modularExponentiation(a, MOD - 2, MOD)) % MOD;
  ll rk = modularExponentiation(r, k, MOD);
  ll base = modularExponentiation(a, n, MOD);
  if (rk != 1) {
    base =
        (base * (modularExponentiation(rk, terms, MOD) + MOD - 1) % MOD) % MOD;
    base = (base * modularExponentiation((rk + MOD - 1) % MOD, MOD - 2, MOD)) %
           MOD;
  } else {
    base = (base * terms) % MOD;
  }
  ll tot = 0;
  for (int i = 0; i < k; i++) {
    if (sg[i] == '+')
      tot = (tot + base) % MOD;
    else
      tot = (tot + MOD - base) % MOD;
    base = (base * r) % MOD;
  }
  cout << tot << endl;
  return 0;
}
