#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll T,T1;
    cin>>T;
    for(T1=1; T1<=T ;T1++)
    {
        ll n,a,b,odd=0,even=0,x1=0,st,i;
        string s;
        cin>>n>>a>>b;
        cin>>s;
        if(b>=0)
            cout<<(n*a)+(n*b)<<endl;
        else
        {
        st=0;
        odd=0;
        even=0;
        while(1)
        {
            for(i=st; i<n; i++)
            {
                if(s[i]!=s[st])
                    break;
            }
            if(x1%2==0)
                even++;
            else
                odd++;
            x1++;
            st=i;
            if(st>=n)
                break;

        }
        ll p;
        p=min(odd,even);
        cout<<(n*a)+(b*(p+1))<<endl;
        }
    }

}
