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<5;i){
for(int j=i+1;j<11-i;j){
sum+=b[i][j];
}}printf("%.1lf\n",sum);
}else {for(int i=0;i<5;i){
for(int j=i+1;j<11-i;j){
sum+=b[i][j];
cont++;
}
}
double y=sum/cont;
printf("%.1lf\n",y);
}
return 0;
}