#include <bits/stdc++.h>
using namespace std;
const int MX = 112345;
const long long mod = 1e9 + 9;
long long bigMod(long long b, long long p) {
  long long x = 1LL;
  for (; p > 0; p /= 2) {
    if (p & 1) x = (x * b) % mod;
    b = (b * b) % mod;
  }
  return x % mod;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, a, b, k, res = 0;
  string sgn;
  cin >> n >> a >> b >> k >> sgn;
  for (int i = 0; i < k; i++) {
    long long tmp = (bigMod(a, n - i) % mod * bigMod(b, i) % mod) % mod;
    if (sgn[i] == '-')
      res = (res - tmp + mod) % mod;
    else
      res = (res + tmp + mod) % mod;
  }
  long long p, q, d = ((n + 1) / k);
  p = (bigMod(b, k) % mod * bigMod(bigMod(a, k) % mod, mod - 2) % mod) % mod;
  if (p == 1) {
    res = (res * d + mod) % mod;
    cout << res << endl;
    return 0;
  }
  q = ((bigMod(p, d) - 1 + mod) % mod * bigMod(p - 1 + mod, mod - 2) % mod) %
      mod;
  res = (res * q + mod) % mod;
  cout << res << endl;
  return 0;
}
