program sss;
uses crt;
var s:string;
i,k,m:integer;
begin
clrscr;
readln(s);
for i:=1 to length(s)-2 do
begin
if ( (s[i] = 'т') or (s[i] = 'Т') ) and ( (s[i+1] = 'о') or (s[i+1] = 'О') ) and ( (s[i+2] = 'М') or (s[i+2] = 'м') then
begin
k:=1;
break;
end;
end;
if k = 1 then writeln('Да')
else writeln('Нет');
readkey;
end.