#include <bits/stdc++.h>
using namespace std;
const int maxn = 400000 + 10;
const int mod = int(1e9) + 9;
long long quick_pow(long long base, long long n) {
  long long ans = 1;
  while (n) {
    if (n & 1) ans = ans * base % mod;
    base = base * base % mod;
    n >>= 1;
  }
  return ans;
}
char str[maxn];
int main() {
  int n, a, b, k;
  scanf("%d %d %d %d", &n, &a, &b, &k);
  scanf("%s", str);
  while (k < int(1e4)) {
    for (int i = 0; i < k; i++) str[i + k] = str[i];
    k <<= 1;
  }
  long long ans = 0;
  int m = (n + 1) / k;
  long long st = n;
  long long ed = 0;
  if (m > 0) {
    long long tmp = 0;
    st = st - k;
    for (int i = 0; i < k; i++) {
      if (str[i] == '+')
        tmp = (tmp + quick_pow(a, k - i) * quick_pow(b, i) % mod + mod) % mod;
      else
        tmp = (tmp - quick_pow(a, k - i) * quick_pow(b, i) % mod + mod) % mod;
    }
    while (st > 0) {
      ans = (ans + (quick_pow(a, st) * quick_pow(b, ed) % mod) * tmp % mod +
             mod) %
            mod;
      st -= k;
      ed += k;
      if (st < 0) {
        st += k;
        ed -= k;
        break;
      }
    }
  }
  long long sum = 0;
  for (int i = st; i >= 0; i--) {
    if (str[st - i] == '+')
      sum = (sum + quick_pow(a, i) * quick_pow(b, n - i) % mod + mod) % mod;
    else
      sum = (sum - quick_pow(a, i) * quick_pow(b, n - i) % mod + mod) % mod;
  }
  ans = (ans + sum + mod) % mod;
  printf("%lld\n", ans);
  return 0;
}
