import java.util.Scanner;
public class test
{
public static void main(String[]args)
{
while(true){
Scanner sc = new Scanner(System.in);
int num=0;
do{
if (num>7||num<0) {
System.out.println("输入有误!");
break;
}else{
System.out.println("请输入0-7的数字:");
num = sc.nextInt();
switch(num){
case 1: System.out.println("MON");break;
case 2: System.out.println("TUE");break;
case 3: System.out.println("WED");break;
case 4: System.out.println("THU");break;
case 5: System.out.println("FRI");break;
case 6: System.out.println("SAT");break;
case 7: System.out.println("SUN");break;
}
}
}
while(num!=0);
if (num==0) {
System.out.println("结束");
break;
}
}
}
}