#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = static_cast<ll>(1e9) + 7;
const int MAXN = static_cast<int>(1e6) + 17;
ll n, a, b, k;
string s;
bool read() {
  if (!(cin >> n >> a >> b >> k >> s)) return false;
  return true;
}
ll binpow(ll a, ll n, ll mod) {
  ll res = 1;
  for (; n > 0; n /= 2, a = a * a % mod)
    if (n & 1) res = res * a % mod;
  return res;
}
void solve() {
  ll MOD = INF + 2;
  ll ak = binpow(a, k, MOD);
  ll bk = binpow(b, k, MOD);
  ak = binpow(ak, MOD - 2, MOD);
  ll q = ak * bk % MOD;
  ll b1 = 0;
  for (int i = 0; i < k; ++i) {
    ll t = 1;
    if (s[i] == '-') t = -1;
    b1 += t * (binpow(a, n - i, MOD) * binpow(b, i, MOD) % MOD);
    b1 %= MOD;
    if (b1 < 0) b1 += MOD;
  }
  ll z = (MOD + q - 1) % MOD;
  if (z == 0) {
    cout << b1 * ((n + 1) / k) % MOD << '\n';
    return;
  }
  z = binpow(z, MOD - 2, MOD);
  ll res = b1 * (MOD + binpow(q, (n + 1) / k, MOD) - 1) % MOD;
  if (res < 0) res += MOD;
  res *= z;
  res %= MOD;
  if (res < 0) res += MOD;
  cout << res << '\n';
}
int main() {
  cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::mt19937 rand('S' + 'E' + 'R' + 'E' + 'Z' + 'H' + 'K' + 'A');
  while (read()) solve();
  return 0;
}
