#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 9;
const long long INF = 1e9 + 7;
long long mod(long long n) { return (n % MOD + MOD) % MOD; }
long long fp(long long a, long long b) {
  if (b == 0) return 1;
  long long t = fp(a, b / 2);
  if (b % 2 == 0)
    return mod(t * t);
  else
    return mod(mod(t * t) * a);
}
long long mdiv(long long a, long long b) { return mod(a * fp(b, MOD - 2)); }
const long long WANT = 50007;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  ++n;
  string s;
  cin >> s;
  while ((long long)s.size() < WANT) s += s;
  long long st = 0;
  long long len = s.size();
  for (long long i = 0; i < len; ++i) {
    if (s[i] == '+')
      st += mod(fp(a, n - i - 1) * fp(b, i));
    else
      st -= mod(fp(a, n - i - 1) * fp(b, i));
    st = mod(st);
  }
  long long ans = 0;
  long long fact = 1;
  long long step = mdiv(fp(b, len), fp(a, len));
  for (long long i = 0; i < n / len; ++i) {
    ans += mod(st * fact);
    ans = mod(ans);
    fact = mod(fact * step);
  }
  for (long long i = 0; i < n % len; ++i) {
    long long p = (n / len) * len + i;
    if (s[i] == '+')
      ans += mod(fp(a, n - p - 1) * fp(b, p));
    else
      ans -= mod(fp(a, n - p - 1) * fp(b, p));
    ans = mod(ans);
  }
  ans = mod(ans);
  cout << ans << '\n';
  return 0;
}
