#include<iostream>
using namespace std;
int main(){
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},a,b,c,d=0,e,i;
cin>>a>>b>>c;
cout<<a<<"年"<<b<<"月"<<c<<"日"<<endl;
for(i=0;i<b-1;i++){
d+=month[i];
}
if(b>2){
e=(a-1990)*365+d+c+(a-1990)/4;}
else if(b<2){
e=(a-1990)*365+d+c+(a-1990)/4-1;
}
cout<<e<<"天"<<endl;
if(e%5<=3&&e%5!=0){
cout<<"他今天打鱼"<<endl;
}
else if(e%5==4||e%5==0){
cout<<"他今天晒网"<<endl;
}
return 0;
}