#include <bits/stdc++.h>
using namespace std;
long long fast(long long a, long long b, long long c = 1000000009) {
  long long ret = 1;
  a %= c;
  while (b) {
    if (b & 1) ret = (ret * a) % c;
    a = (a * a) % c;
    b >>= 1;
  }
  return ret;
}
struct Matrix {
  long long M[5][5], n, m;
  Matrix(int _n, int _m) : n(_n), m(_m) { fill(&M[0][0], &M[4][5], 0); }
  Matrix operator*(const Matrix &b) {
    Matrix c = Matrix(n, b.m);
    for (int i = 0; i < c.n; i++) {
      for (int j = 0; j < c.m; j++) {
        for (int k = 0; k < m; k++) {
          c.M[i][j] += M[i][k] * b.M[k][j];
          c.M[i][j] %= 1000000009;
        }
      }
    }
    return c;
  }
  Matrix operator^(long long b) {
    Matrix c = Matrix(n, m);
    Matrix t = *this;
    for (int i = 0; i < c.n; i++) c.M[i][i] = 1;
    while (b) {
      if (b & 1) c = c * t;
      t = t * t;
      b >>= 1;
    }
    return c;
  }
};
int main() {
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  string s;
  cin >> s;
  long long ans = 0;
  for (int i = 0; i < k; i++) {
    int tmp = s[i % k] == '+' ? 1 : -1;
    ans += (tmp * fast(a, n - i) * fast(b, i)) % 1000000009;
    ans += 1000000009;
    ans %= 1000000009;
  }
  long long t = ans,
            tt = fast(fast(a, 1000000009 - 2), k) * fast(b, k) % 1000000009;
  if ((n + 1) / 2 - 1 == 0) {
    cout << ans << '\n';
    return 0;
  }
  if (tt == 1) {
    cout << ans * (n + 1) / k % 1000000009 << '\n';
    return 0;
  }
  long long p =
      (1 - fast(tt, (n + 1) / k)) * (fast(1 - tt, 1000000009 - 2)) % 1000000009;
  p += 1000000009;
  p %= 1000000009;
  cout << ans % 1000000009 * p % 1000000009 << '\n';
  return 0;
}
