#include <bits/stdc++.h>
using namespace std;
int nxt() {
  int x;
  cin >> x;
  return x;
}
long long int nxtl() {
  long long int x;
  cin >> x;
  return x;
}
void SieveOfEratosthenes(int n, vector<int> &primes) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) primes.push_back(p);
}
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int power(long long int x, long long int y, long long int mod) {
  long long int temp;
  if (y == 0) return 1;
  temp = power(x, y / 2, mod);
  if (y % 2 == 0)
    return (temp * temp) % mod;
  else
    return (((x * temp) % mod) * temp) % mod;
}
long long int binomialCoeff(long long int n, long long int k) {
  long long int C[k + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = min(i, k); j > 0; j--) C[j] = C[j] + C[j - 1];
  }
  return C[k];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = nxt();
  while (t--) {
    long long int n = nxtl(), a = nxtl(), b = nxtl();
    string s;
    cin >> s;
    vector<long long int> v;
    int i = 0;
    while (i < n) {
      int x = i;
      while (i < n && s[i] == s[x]) i++;
      v.push_back(i - x);
    }
    if (v.size() == 1) {
      cout << (n + 1) * b + a * n << endl;
      continue;
    }
    int m = v.size();
    long long int test =
        v[0] * a + v[0] * b + v[m - 1] * a + v[m - 1] * b + 2 * a;
    long long int tot = 0;
    for (int i = 1; i < m - 1; i++) tot += v[i];
    test += (a * tot + 2 * b * (tot + 1));
    for (int i = 2; i < m - 2; i += 2) {
      if ((v[i] - 1) * b > 2 * a) test += (2 * a - ((v[i] - 1) * b));
    }
    cout << test << endl;
  }
  return 0;
}
