#include <bits/stdc++.h>
using namespace std;
int64_t mx = 1e9 + 9;
int64_t po(int64_t a, int64_t b) {
  int64_t ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans * (a % mx)) % mx;
    }
    a = a * a % mx;
    b = b >> 1;
  }
  return ans;
}
int main() {
  int64_t n, a, b, k, curr = 0;
  cin >> n >> a >> b >> k;
  string s;
  cin >> s;
  for (int64_t i = 0; i < k; i++) {
    if (s[i] == '+') {
      curr = (curr + (po(a, n - i) * (po(b, i) % mx)) % mx) % mx;
    } else {
      curr = (curr - (po(a, n - i) * po(b, i) % mx) + mx) % mx;
    }
  }
  int64_t qq = po(a, k);
  int64_t t = (po(qq, (mx - 2) % (mx)) % mx) * po(b, k) % mx;
  if (t == 1)
    curr = curr * ((n + 1) / k) % mx;
  else
    curr = (curr * po(t - 1, (mx - 2) % (mx)) % (mx)) *
           (po(t, (n + 1) / k) - 1) % mx;
  cout << curr << endl;
  return 0;
}
