#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 9;
long long power(long long a, long long n) {
  long long res = 1;
  for (; n; n >>= 1, a = a * a % mod)
    if (n & 1) res = res * a % mod;
  return res;
}
int main() {
  long long n, a, b, k, t = 0;
  char x;
  cin >> n >> a >> b >> k;
  for (long long i = 0; i < k; i++) {
    cin >> x;
    if (x == '+')
      t += power(a, n - i) * power(b, i) % mod;
    else
      t -= power(a, n - i) * power(b, i) % mod;
    t = (t + mod) % mod;
  }
  n = (n + 1) / k;
  b = power(b, k);
  a = power(a, k);
  long long tt = b * power(a, mod - 2) % mod;
  if (tt != 1)
    t = t * (power(tt, n) + mod - 1) % mod *
        power((tt + mod - 1) % mod, mod - 2) % mod;
  else
    t = n * t % mod;
  cout << t;
  return 0;
}
