#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 50;
const int mod = 1e9 + 9;
long long qpow(long long a, long long b) {
  long long base = a;
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans * base) % mod;
    }
    base = (base * base) % mod;
    b = b >> 1;
  }
  return ans;
}
long long n, a, b, k;
string s;
int main() {
  cin >> n >> a >> b >> k;
  cin >> s;
  long long a1 = 0;
  for (int i = 0; i < s.size(); i++) {
    long long flag = 1;
    if (s[i] == '-') {
      flag = -1;
    }
    a1 = (a1 + flag * (qpow(a, n - i) * qpow(b, i)) % mod + mod) % mod;
  }
  long long m = (n + 1) / k;
  long long ak = qpow(a, k);
  long long bk = qpow(b, k);
  long long x = qpow(ak, mod - 2);
  long long q = (bk * x) % mod;
  long long ans = 0;
  if (q != 1) {
    ans = (a1 * ((qpow(q, m) - 1)) % mod + mod) % mod;
    long long t1 = qpow(q - 1, mod - 2);
    ans = (ans * t1) % mod;
  } else {
    ans = (a1 * m) % mod;
  }
  cout << ans << endl;
  return 0;
}
