#include <bits/stdc++.h>
using namespace std;
char s[100005];
long long mypow(long long a, long long p) {
  long long rez = 1;
  while (p > 0) {
    if (p % 2 == 1) {
      rez = (rez * a) % 1000000009;
    }
    a = (a * a) % 1000000009;
    p /= 2;
  }
  return rez % 1000000009;
}
int main() {
  long long n, a, b, k, sum, t1, t2, i, inva, nrt, q, ans;
  cin >> n >> a >> b >> k;
  cin >> s;
  sum = 0;
  t1 = mypow(a, n);
  t2 = 1;
  if (s[0] == '+')
    sum = t1;
  else
    sum = -t1;
  if (sum < 0) sum += 1000000009;
  sum = sum % 1000000009;
  inva = mypow(a, 1000000009 - 2);
  for (i = 1; i < k; i++) {
    t1 = (t1 * inva) % 1000000009;
    t2 = (t2 * b) % 1000000009;
    if (s[i] == '+') {
      sum = sum + (t1 * t2) % 1000000009;
    } else {
      sum = sum - (t1 * t2) % 1000000009;
    }
    while (sum < 0) sum += 1000000009;
    sum = sum % 1000000009;
  }
  sum = sum % 1000000009;
  if (sum < 0) sum += 1000000009;
  while (sum == 0) {
    n -= k;
    if (n <= 0) {
      cout << 0 << '\n';
      return 0;
    }
    for (i = 0; i < k; i++) {
      t1 = (t1 * inva) % 1000000009;
      t2 = (t2 * b) % 1000000009;
      if (s[i] == '+') {
        sum = sum + (t1 * t2) % 1000000009;
      } else {
        sum = sum - (t1 * t2) % 1000000009;
      }
      while (sum < 0) sum += 1000000009;
      sum = sum % 1000000009;
    }
  }
  if (n + 1 == k) {
    cout << sum << '\n';
    return 0;
  }
  nrt = (n + 1) / k;
  q = (b * inva) % 1000000009;
  q = mypow(q, k);
  if (q == 1) {
    sum = (sum * nrt) % 1000000009;
    cout << sum << '\n';
    return 0;
  }
  ans = mypow(q, nrt) - 1;
  if (ans < 0) ans += 1000000009;
  ans = (ans * sum) % 1000000009;
  ans = ans * (mypow(q - 1, 1000000009 - 2));
  cout << ans % 1000000009;
  return 0;
}
