#include <bits/stdc++.h>
using namespace std;
#define ff first
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define mod 1000000007
#define MOD1 = 998244353;
const int N = 2e5 + 5;
#define INF 1e18
#define fi(a, b) for (int i = a; i < b; ++i)
#define fj(a, b) for (int j = a; j < b; ++j)
#define fdi(a, b) for (int i = a - 1; i >= b; --i)
#define fdj(a, b) for (int j = a - 1; j >= b; --j)
#define fdo(a, b) \
    for (int o = a - 1; o >= b; --o))
#define ps(x, y) fixed << setprecision(y) << x
#define mk(arr, n, type) type *arr = new type[n];
#define w(x)  \
    int x;    \
    cin >> x; \
    while (x--)
#define X first
#define sz(a) (int)(a.size())
#define Y second
#define eb emplace_back
#define ALL(x) begin(x), end(x)
#define RALL(x) rbegin(x), rend(x)
#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define print cout <<
#define LSB(i) ((i) & -(i))
const int maxn = 3E5 + 5;
int xc[4] = {-1, 1, 0, 0};
int yc[4] = {0, 0, -1, 1};

void akkicpp()
{
    int number, first, lasy;
    cin >> number >> first >> lasy;
    string s;
    cin >> s;
    int ans = 0;
    if (lasy>=0)
    {
         ans=number*first+number*lasy;
    }
    else 
    {
        int cnt=0;
        int i;
         char e=s[0],m=s[0];
        fi(1,number+1)
        {
            if(s[i]!=e&&s[i]!=m) {cnt++; }  e=s[i];
        }
        cnt+1;
        ans=first*number+lasy*cnt;
    }
    cout << ans << endl;
}
int32_t main()
{
    w(x)
    {
        akkicpp();
    }
}
