//Saptak_Roy_Turja   #include<bits/stdc++.h>   #define ll long long int   using namespace std;   int main()   {       int t;       cin>>t;       while(t--){           ll n,a,b,c=1,i;           string s;           cin>>n>>a>>b>>s;           for(i=1;i<n;i++){               if(s[i]!=s[i-1]){                   c++;               }           }           if(b>=0){               cout<<n*(a+b)<<  n ;           }           else {               cout<<n*a+b*(c/2+1)<<  n ;           }       }   }   