function Main(input) {
    var week = String(input);
    
    console.log(week === "SAT" ? 1 : "");
    console.log(week === "FRI" ? 2 : "");
    console.log(week === "THU" ? 3 : "");
    console.log(week === "WED" ? 4 : "");
    console.log(week === "TUE" ? 5 : "");
    console.log(week === "MON" ? 6 : "");
    console.log(week === "SUN" ? 7 : "");
    
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
