#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> ve;
typedef pair<int, int> pa;
template <typename T> T gcd(T a, T b) {return b ? gcd(b, a % b) : a;}
void solve()
{
    int t;
    cin >> t;
    while (t--)
    {
        int n, a, b;
        string s;
        cin >> n >> a >> b >> s;
        int x = (a + b) * n;
        int m = unique(s.begin(), s.end()) - s.begin();

        int y = n * a + ((m / 2 + 1) * b);
        cout << max(x, y) << "\n";

    }
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
}