#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(time(0));
const long long N = 1e6 + 7;
const long long MOD = 1e9 + 9;
long long fastpow(long long b, long long p) {
  long long temp;
  if (p == 0) return 1;
  if (p == 1) return b;
  temp = fastpow(b, p / 2);
  temp = temp * temp % MOD;
  if (p & 1) {
    temp = temp * b % MOD;
  }
  return temp;
}
long long add(long long x, long long y) {
  x += y;
  if (x >= MOD) return x - MOD;
  return x;
}
long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) return x + MOD;
  return x;
}
long long mult(long long x, long long y) { return (x * y) % MOD; }
long long bin_pow(long long x, long long p) {
  if (p == 0) return 1;
  if (p & 1) return mult(x, fastpow(x, p - 1));
  return fastpow(mult(x, x), p / 2);
}
long long rev(long long x) { return fastpow(x, MOD - 2); }
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  string s;
  cin >> s;
  long long ans = 0, cur = fastpow(a, n), x = mult(b, rev(a));
  for (long long i = 0; i < k; i++) {
    if (s[i] == '+')
      ans = add(ans, cur);
    else
      ans = sub(ans, cur);
    cur = mult(cur, x);
  }
  n++;
  n /= k;
  x = fastpow(x, k);
  if (x == 1) {
    ans = mult(ans, n);
  } else {
    ans = mult(ans, sub(fastpow(x, n), 1));
    ans = mult(ans, rev(sub(x, 1)));
  }
  cout << ans;
  return 0;
}
