Program lena1PL; var s:string; i,c:integer; begin readln(s); for i:=1 to (length(s) div 2) do if s[i]=s[length(s)-i+1] then inc(c,1) else begin writeln('HET'); exit; end; if c=(length(s) div 2) then writeln('DA'); end.