#include <bits/stdc++.h>
#define ll         long long int
#define fo(i,n)    for(ll i=0;i<n;i++)
#define vi         vector<ll>
#define mp         make_pair
#define pii        pair<ll,ll>
#define ff         first
#define ss         second
#define pb         push_back
#define ERASE(x)   x.erase(unique(x.begin(),x.end()),x.end())
#define all(a)     (a).begin(),(a).end()
#define endl       '\n'
#define fast       ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
#define mm         10000000000
const long long    MOD = 1e9 + 7;
using namespace std;

int main(){
    fast;
    ll t;
    cin>>t;
    while(t--){
        ll n,a,b;
        cin>>n>>a>>b;
        string s;
        cin>>s;
        ll one=0,zero=0,sum=a*n,c=1,flag=0;
        if(b>=0){
            sum=sum+b*(n);
            cout<<sum<<endl;
            flag=1;
        }
        if(flag==0){
            fo(i,n-1)
                if(s[i]!=s[i+1])
                    c++;
            sum=sum+b*((c/2)+1);
            cout<<sum<<endl;
        }
    }
}