#include <iostream>
using namespace std;
int main(void){
    int a,b;
    while (cin >>a>>b) {
        if(a==0 && b==0) break;
        
        else if(a==1){
            if((b+7)%7==1) cout<<"Thursday"<<endl; else if((b+7)%7==2) cout<<"Friday"<<endl;
            else if((b+7)%7==3) cout<<"Saturday"<<endl; else if((b+7)%7==4) cout<<"Sunday"<<endl;
            else if((b+7)%7==5) cout<<"Monday"<<endl; else if((b+7)%7==6) cout<<"Tuesday"<<endl;
            else cout<<"Wednesday"<<endl;
        }
        
        else if(a==2){
            if((b+7)%7==1) cout<<"Sunday"<<endl; else if((b+7)%7==2) cout<<"Monday"<<endl;
            else if((b+7)%7==3) cout<<"Tuesday"<<endl; else if((b+7)%7==4) cout<<"Wednesday"<<endl;
            else if((b+7)%7==5) cout<<"Thursday"<<endl; else if((b+7)%7==6) cout<<"Friday"<<endl;
            else cout<<"Saturday"<<endl;
        }
        else if(a==3){
            if((b+7)%7==1) cout<<"Monday"<<endl; else if((b+7)%7==2) cout<<"Tuesday"<<endl;
            else if((b+7)%7==3) cout<<"Wednesday"<<endl; else if((b+7)%7==4) cout<<"Thursday"<<endl;
            else if((b+7)%7==5) cout<<"Friday"<<endl; else if((b+7)%7==6) cout<<"Saturday"<<endl;
            else cout<<"Sunday"<<endl;
        }
        
        else if(a==4){
            if((b+7)%7==1) cout<<"Thursday"<<endl; else if((b+7)%7==2) cout<<"Friday"<<endl;
            else if((b+7)%7==3) cout<<"Saturday"<<endl; else if((b+7)%7==4) cout<<"Sunday"<<endl;
            else if((b+7)%7==5) cout<<"Monday"<<endl; else if((b+7)%7==6) cout<<"Tuesday"<<endl;
            else cout<<"Wednesday"<<endl;
        }
        
        else if(a==5){
            if((b+7)%7==1) cout<<"Saturday"<<endl; else if((b+7)%7==2) cout<<"Sunday"<<endl;
            else if((b+7)%7==3) cout<<"Monday"<<endl; else if((b+7)%7==4) cout<<"Tuesday"<<endl;
            else if((b+7)%7==5) cout<<"Wednesday"<<endl; else if((b+7)%7==6) cout<<"Thursday"<<endl;
            else cout<<"Saturday"<<endl;
        }
        
        else if(a==6){
            if((b+7)%7==1) cout<<"Tuesday"<<endl; else if((b+7)%7==2) cout<<"Wednesday"<<endl;
            else if((b+7)%7==3) cout<<"Thursday"<<endl; else if((b+7)%7==4) cout<<"Friday"<<endl;
            else if((b+7)%7==5) cout<<"Saturday"<<endl; else if((b+7)%7==6) cout<<"Sunday"<<endl;
            else cout<<"Monday"<<endl;
        }
        
        
        else if(a==7){
            if((b+7)%7==1) cout<<"Thursday"<<endl; else if((b+7)%7==2) cout<<"Friday"<<endl;
            else if((b+7)%7==3) cout<<"Saturday"<<endl; else if((b+7)%7==4) cout<<"Sunday"<<endl;
            else if((b+7)%7==5) cout<<"Monday"<<endl; else if((b+7)%7==6) cout<<"Tuesday"<<endl;
            else cout<<"Wednesday"<<endl;
        }
        
        else if(a==8){
            if((b+7)%7==1) cout<<"Sunday"<<endl; else if((b+7)%7==2) cout<<"Monday"<<endl;
            else if((b+7)%7==3) cout<<"Tuesday"<<endl; else if((b+7)%7==4) cout<<"Wednesday"<<endl;
            else if((b+7)%7==5) cout<<"Thursday"<<endl; else if((b+7)%7==6) cout<<"Friday"<<endl;
            else cout<<"Saturday"<<endl;
            
        }
        
        else if(a==9){
            if((b+7)%7==1) cout<<"Wednesday"<<endl; else if((b+7)%7==2) cout<<"Thursday"<<endl;
            else if((b+7)%7==3) cout<<"Friday"<<endl; else if((b+7)%7==4) cout<<"Saturday"<<endl;
            else if((b+7)%7==5) cout<<"Sunday"<<endl; else if((b+7)%7==6) cout<<"Monday"<<endl;
            else cout<<"Tuesday"<<endl;
        }
        
        else if(a==10){
            if((b+7)%7==1) cout<<"Friday"<<endl; else if((b+7)%7==2) cout<<"Saturday"<<endl;
            else if((b+7)%7==3) cout<<"Sunday"<<endl; else if((b+7)%7==4) cout<<"Monday"<<endl;
            else if((b+7)%7==5) cout<<"Tuesday"<<endl; else if((b+7)%7==6) cout<<"Wednesday"<<endl;
            else cout<<"Thursday"<<endl;
            
        }
        
        else if(a==11){
            if((b+7)%7==1) cout<<"Monday"<<endl; else if((b+7)%7==2) cout<<"Tuesday"<<endl;
            else if((b+7)%7==3) cout<<"Wednesday"<<endl; else if((b+7)%7==4) cout<<"Thursday"<<endl;
            else if((b+7)%7==5) cout<<"Friday"<<endl; else if((b+7)%7==6) cout<<"Saturday"<<endl;
            else cout<<"Sunday"<<endl;
        }
        else if(a==12){
            if((b+7)%7==1) cout<<"Wednesday"<<endl; else if((b+7)%7==2) cout<<"Thursday"<<endl;
            else if((b+7)%7==3) cout<<"Friday"<<endl; else if((b+7)%7==4) cout<<"Saturday"<<endl;
            else if((b+7)%7==5) cout<<"Sunday"<<endl; else if((b+7)%7==6) cout<<"Monday"<<endl;
            else cout<<"Tuesday"<<endl;
        }
        
        
        
    }
} 
    
    
    
    

