#include <bits/stdc++.h>
using namespace std;
void input(vector<int>& a) {
  for (int i = 0; i < a.size(); i++) cin >> a[i];
}
void inputp(vector<pair<int, int> >& a) {
  for (int i = 0; i < a.size(); i++) cin >> a[i].first >> a[i].second;
}
void output(vector<int>& a) {
  for (int i = 0; i < a.size(); i++) cout << a[i] << ' ';
}
void outputp(vector<pair<int, int> >& a) {
  for (int i = 0; i < a.size(); i++)
    cout << a[i].first << ' ' << a[i].second << endl;
}
const long long mod = 1000000009;
long long power(long long a, long long b) {
  long long ans = 1LL;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b /= 2.0;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  long long pa = power(a, n);
  long long push_back = 1LL;
  long long ipa = power(a, mod - 2LL);
  string s;
  cin >> s;
  long long ans = 0;
  long long count = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '+') {
      ans += (pa * push_back) % mod;
      ans %= mod;
      count++;
    } else {
      ans = (ans + (mod - (pa * push_back) % mod) % mod) % mod;
      count--;
    }
    pa = (pa * ipa) % mod;
    push_back = (push_back * b) % mod;
  }
  long long temp = ((long long)power(b, k) * (long long)power(ipa, k)) % mod;
  if (temp == 1) {
    ans = (ans * (n + 1LL) / k) % mod;
  } else {
    long long t = (power(temp, (n + 1LL) / k) + mod - 1LL) % mod;
    long long y = power((temp + mod - 1LL) % mod, mod - 2LL);
    t = (t * y) % mod;
    ans = (ans * t) % mod;
  }
  cout << ans << endl;
  return 0;
}
