#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
long long power(long long x, long long y) {
  if (x == 0) return 0;
  long long ret = 1;
  for (; y; y >>= 1, x = x * x % 1000000009)
    if (y & 1) (ret *= x) %= 1000000009;
  return ret;
}
int main() {
  long long n, a, b, k;
  while (cin >> n >> a >> b >> k) {
    string ch;
    cin >> ch;
    int len = ch.length();
    long long aa = power(a, n), tmp = 0, bb = 1LL;
    long long ret_a = power(a, k), ret_b = power(b, k);
    for (int i = 0; i < len; i++) {
      if (ch[i] == '+')
        tmp = (tmp + aa * bb % 1000000009) % 1000000009;
      else
        tmp = (tmp - aa * bb % 1000000009 + 1000000009) % 1000000009;
      (aa *= power(a, 1000000009 - 2)) %= 1000000009;
      (bb *= b) %= 1000000009;
    }
    long long q = ret_b * power(ret_a, 1000000009 - 2) % 1000000009;
    long long sz = (n + 1) / k;
    long long ans = 0;
    if (q != 1) {
      ans = (power(q, sz) - 1 + 1000000009) % 1000000009 *
            power(q - 1, 1000000009 - 2) % 1000000009;
      (ans *= tmp) %= 1000000009;
      cout << ans << endl;
    } else {
      ans = (tmp * sz) % 1000000009;
      cout << ans << endl;
    }
  }
  return 0;
}
