#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e16;
const long long MOD = 1e9 + 9;
const int MAX = 100015;
long long fp(long long a, long long b) {
  if (b == 0) return 1;
  long long ret = fp(a, b / 2);
  ret *= ret;
  ret %= MOD;
  if (b % 2) ret *= a;
  ret %= MOD;
  return ret;
}
int main() {
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  string s;
  cin >> s;
  long long val = 0;
  long long num = fp(a, n);
  if (s[0] == '+')
    val += num;
  else
    val -= num;
  val += MOD;
  val %= MOD;
  for (int i = 1; i < k; i++) {
    num *= b;
    num %= MOD;
    num *= fp(a, MOD - 2);
    num %= MOD;
    num += MOD;
    num %= MOD;
    if (s[i] == '+') {
      val += num;
    } else {
      val -= num;
    }
    val += MOD;
    val %= MOD;
  }
  n++;
  long long times = n / k;
  long long q = fp(b, k) * fp(a, MOD - k - 1);
  q %= MOD;
  long long sum;
  if (q == 1) {
    sum = (times)*val;
    sum %= MOD;
  } else {
    sum = val * (((fp(q, times) - 1) * fp(q - 1, MOD - 2)) % MOD);
    sum %= MOD;
  }
  int m = n / k;
  m *= k;
  for (int i = m; i < n; i++) {
    num = fp(a, n - i) * fp(b, i);
    num %= MOD;
    if (s[(i) % k] == '+')
      sum += num;
    else
      sum -= num;
    sum += MOD;
    sum %= MOD;
  }
  cout << sum;
}
