#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 9;
template <typename T>
inline T BigMod(T A, T B, T M = MOD) {
  A %= M;
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % M;
    A = (A * A) % M;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T InvMod(T A, T M = MOD) {
  return BigMod(A, M - 2, M);
}
inline void normal(long long& a) {
  a %= MOD;
  (a < 0) && (a += MOD);
}
inline long long mul(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a * b) % MOD;
}
inline long long add(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  return (a + b) % MOD;
}
inline long long sub(long long a, long long b) {
  a %= MOD, b %= MOD;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b, k, sum = 0, A, B, flag = 0, neg = 0;
  cin >> n >> a >> b >> k;
  string str;
  cin >> str;
  long long inv = BigMod(a, k);
  long long m = BigMod(b, k);
  inv = InvMod(inv);
  m = mul(inv, m);
  for (long long i = 0; i < k; i++) {
    if (str[i] == '+') {
      A = BigMod(a, n - i);
      B = BigMod(b, i);
      sum = add(sum, mul(A, B));
    } else {
      A = BigMod(a, n - i);
      B = BigMod(b, i);
      neg = add(neg, mul(A, B));
    }
    if (i == n) {
      sum = sub(sum, neg);
      cout << sum << endl;
      return 0;
    }
  }
  sum = sum - neg;
  if (sum < 0) {
    neg = 1;
    sum *= -1;
  } else
    neg = 0;
  long long gun = m;
  long long ans;
  long long x, y;
  x = gun;
  y = sum;
  if (x == 1) {
    ans = mul(y, (n + 1) / k);
    if (neg) ans = MOD - ans;
    cout << ans % MOD << endl;
    return 0;
  }
  long long hor, lob;
  hor = BigMod(x, (n + 1) / k);
  hor = sub(hor, 1);
  hor = mul(hor, y);
  lob = sub(x, 1);
  lob = InvMod(lob);
  ans = mul(hor, lob);
  if (neg) {
    ans = -ans + MOD;
    ans %= MOD;
    cout << ans << endl;
  } else
    cout << ans << endl;
}
