include[HTML_REMOVED]
using namespace std;
int main()
{
char a;
cin>>a;
double m[12][12];
double sum=0;
for (int i=0;i<12;i)
{
for(int j=0;j<12;j)
{
cin>>m[i][j];
if((i+j) <= 10 && i>j)
sum += m[i][j];
}
}
if(a==’S’)
printf(“%.1lf”,sum);
else
printf(“%.1lf”,sum/30);
return 0;
}