#include<bits/stdc++.h>
using namespace std;
main()
{
long ts;
cin>>ts;
while(ts--)
{
long date,month,k;
string s[10];
cin>>month>>date;
date--;
if(month==1||month==10)
{
s[0]="Saturday";
s[1]="Sunday";
s[2]="Monday";
s[3]="Tuesday";
s[4]="Wednesday";
s[5]="Thursday";
s[6]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==4||month==7)
{
s[1]="Saturday";
s[2]="Sunday";
s[3]="Monday";
s[4]="Tuesday";
s[5]="Wednesday";
s[6]="Thursday";
s[0]="Friday";
k=(date)%7;
cout<<s[k]<<endl;
}
else if(month==5)
{
s[6]="Saturday";
s[0]="Sunday";
s[1]="Monday";
s[2]="Tuesday";
s[3]="Wednesday";
s[4]="Thursday";
s[5]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==8)
{
s[5]="Saturday";
s[6]="Sunday";
s[0]="Monday";
s[1]="Tuesday";
s[2]="Wednesday";
s[3]="Thursday";
s[4]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==6)
{
s[3]="Saturday";
s[4]="Sunday";
s[5]="Monday";
s[6]="Tuesday";
s[0]="Wednesday";
s[1]="Thursday";
s[2]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==2||month==3||month==11)
{
s[4]="Saturday";
s[5]="Sunday";
s[6]="Monday";
s[0]="Tuesday";
s[1]="Wednesday";
s[2]="Thursday";
s[3]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==12||month==9)
{
s[2]="Saturday";
s[3]="Sunday";
s[4]="Monday";
s[5]="Tuesday";
s[6]="Wednesday";
s[0]="Thursday";
s[1]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
}
}
using namespace std;
main()
{
long ts;
cin>>ts;
while(ts--)
{
long date,month,k;
string s[10];
cin>>month>>date;
date--;
if(month==1||month==10)
{
s[0]="Saturday";
s[1]="Sunday";
s[2]="Monday";
s[3]="Tuesday";
s[4]="Wednesday";
s[5]="Thursday";
s[6]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==4||month==7)
{
s[1]="Saturday";
s[2]="Sunday";
s[3]="Monday";
s[4]="Tuesday";
s[5]="Wednesday";
s[6]="Thursday";
s[0]="Friday";
k=(date)%7;
cout<<s[k]<<endl;
}
else if(month==5)
{
s[6]="Saturday";
s[0]="Sunday";
s[1]="Monday";
s[2]="Tuesday";
s[3]="Wednesday";
s[4]="Thursday";
s[5]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==8)
{
s[5]="Saturday";
s[6]="Sunday";
s[0]="Monday";
s[1]="Tuesday";
s[2]="Wednesday";
s[3]="Thursday";
s[4]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==6)
{
s[3]="Saturday";
s[4]="Sunday";
s[5]="Monday";
s[6]="Tuesday";
s[0]="Wednesday";
s[1]="Thursday";
s[2]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==2||month==3||month==11)
{
s[4]="Saturday";
s[5]="Sunday";
s[6]="Monday";
s[0]="Tuesday";
s[1]="Wednesday";
s[2]="Thursday";
s[3]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
else if(month==12||month==9)
{
s[2]="Saturday";
s[3]="Sunday";
s[4]="Monday";
s[5]="Tuesday";
s[6]="Wednesday";
s[0]="Thursday";
s[1]="Friday";
k=date%7;
cout<<s[k]<<endl;
}
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন