#include <bits/stdc++.h>
using namespace std;
long long expo(long long x, long long n, long long m) {
  if (n == 0) return 1;
  long long temp = expo(x, n / 2, m);
  temp = ((temp % m) * (temp % m)) % m;
  if (n % 2 != 0) temp = ((temp % m) * (x % m)) % m;
  return temp;
}
void solve() {
  long long n, a, b, k;
  cin >> n >> a >> b >> k;
  long long ans = 0;
  for (long long i = 0; i < k; i++) {
    char x;
    cin >> x;
    if (x == '+') {
      ans = (ans + ((expo(a, n - i, 1000000009) * expo(b, i, 1000000009)) %
                    1000000009)) %
            1000000009;
    } else {
      ans = (ans -
             ((expo(a, n - i, 1000000009) * expo(b, i, 1000000009)) %
              1000000009) +
             1000000009) %
            1000000009;
    }
  }
  n = (n + 1) / k;
  n--;
  if (n == 0) {
    cout << ans << endl;
    return;
  }
  long long temp = expo(b, k, 1000000009);
  long long temp2 = (expo(a, 1000000009 - 2, 1000000009));
  temp2 = expo(temp2, k, 1000000009);
  temp = (temp * temp2) % 1000000009;
  if (temp == 1) {
    cout << (ans * (n + 1LL)) % 1000000009 << endl;
    return;
  }
  temp2 = expo(temp, n + 1, 1000000009);
  temp2 -= 1;
  if (temp2 < 0) temp2 += 1000000009;
  long long alpha = (temp - 1 + 1000000009) % 1000000009;
  temp2 = (temp2 * expo(alpha, 1000000009 - 2, 1000000009)) % 1000000009;
  ans = (ans * (temp2 % 1000000009)) % 1000000009;
  cout << ans << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  ;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
