import java.io.PrintWriter

object Main extends App {

  val out = new PrintWriter(System.out)
  val month = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30)
  val week = Array("Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday")

  Iterator.continually(io.StdIn.readLine)
    .takeWhile(_ != "0 0")
    .map(s => s.split(" ").map(_.toInt))
    .map(a => month.take(a(0)).sum + a(1))
    .map(d => week(d%7))
    .foreach(out.println)

  out.flush()
}

