with Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;
 use Ada.Text_IO, Ada.Integer_Text_IO, Ada.Float_Text_IO;

procedure main is
   type Week is array(1..7) of String(1..3);
   S: String(1..3);
   W: Week;
begin
   W(1) := "SUN";
   W(2) := "MON";
   W(3) := "TUE";
   W(4) := "WED";
   W(5) := "THU";
   W(6) := "FRI";
   W(7) := "SAT";
   S := get_line;
   for i in 1..7 loop
      if (W(i) = S) then put(7 - i + 1, 0);
      end if;
   end loop;
end main;