#include <bits/stdc++.h>
using namespace std;
string s;
long long f(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000009;
    a = (a * a) % 1000000009;
    b >>= 1;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, a, i, b, k;
  cin >> n >> a >> b >> k;
  long long p = f(a, 1000000009 - 2);
  long long g = f(a, n);
  long long ans = 0;
  cin >> s;
  for (i = 0; i < k; i++) {
    if (s[i] == '+') {
      ans = (ans + g) % 1000000009;
      g = (g * b) % 1000000009;
      g = (g * p) % 1000000009;
    } else {
      ans = (ans - g + 1000000009) % 1000000009;
      g = (g * b) % 1000000009;
      g = (g * p) % 1000000009;
    }
  }
  if (f(a, k) == f(b, k)) {
    p = (n / k) + 1;
    ans = (ans * p) % 1000000009;
    cout << ans << "\n";
    return 0;
  }
  p = (f(b, k * (n / k) + k) - f(a, k * (n / k) + k) + 1000000009) % 1000000009;
  g = ((f(b, k) * f(a, k * (n / k))) % 1000000009 - f(a, k * (n / k) + k) +
       1000000009) %
      1000000009;
  g = f(g, 1000000009 - 2);
  p = (p * g) % 1000000009;
  ans = (ans * p) % 1000000009;
  cout << ans << "\n";
}
