include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
int main()
{int cont=0;
char a;
double sum=0;
cin>>a;
double b[12][12];
for(int i=0;i<12;i){
for(int j=0;j<12;j){
cin>>b[i][j];
}
}
if(a==’S’){for(int i=0;i<11;i){
for(int j=1+i;j<12;j){
sum+=b[i][j];
}}printf("%.1lf\n",sum);
}else {for(int i=0;i<11;i){
for(int j=i+1;j<12;j){
sum+=b[i][j];
cont++;
}
}
double y=sum/cont;
printf("%.1lf\n",y);
}
return 0;
}