#include <bits/stdc++.h>
using namespace std;

int main()
{
    int t, n,a,b;
    string s;
    cin>>t;
    while(t--){
        cin>>n>>a>>b;
        cin>>s;
        int m=1;
        if(b>=0){
            cout<<n*(a+b)<<endl;
        }
        else{
            for(int i=0; i<n-1; i++){
                if(s[i] != s[i+1]){
                    m++;
                }
            }
            int t_khailam = (m/2)+1;
            cout<<a*n+b*t_khailam<<endl;
        }
    }
    return 0;
}
