program l666;
const
w1='this';
w2='the';
var
i:byte;
function get_word(s:string ; var i:byte):string;
var sl:string;
l:byte;
begin
l:=length(s);
for i:=1 to length(s)do
while (i<>l) and (s<>' ') do
inc(i);
sl:=' ';
while (i<=l) and (s>' ') do
begin
sl:=sl+s;
inc(i);
end;
get_word:=sl;
end;
procedure zamena(s:string ;i:byte);
begin
for i := 1 to length(s) do
if s=w1 then
s:=w2;
end;
begin
var st:string;
get_word(st,i);
zamens(s,i);
end.