```cpp
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
double a[12][12];
int main(){
int l,i,j;//excessive ,
double sum=0,aver=0;
char ch;
cin>>l;
cin>>ch;
for(i=0;i<12;i){
for(j=0;j<12;j){
cin>>a[i][j];
}
}
if(ch==’S’){
for(int r=0;r<12;r){
sum+=a[l][r];
}
printf(“%.1lf”,sum);
}
else if(ch==’M’){
for(int r=0;r<12;r){
sum+=a[l][r];
aver=sum/12;
}
printf(“%.1lf”,aver);
}
return 0;
}