Uses Crt; Const Pend ='2100000000'; Type tR = ^tRs; tRs = Record s : String; n : tR; end; Var Pb,Pe,P : tR; Ch : Char; St : String; Begin Pb:=nil; Writeln('Последовательность: '); Repeat St:=''; Repeat Repeat Ch:=ReadKey Until Ch in ['0'..'9',' ','-']; Write(Ch); If Ch<>' ' then St:=St+Ch; Until Ch=' '; If St<>Pend then Begin New(P); P^.s:=St; P^.n:=nil; If Pb=nil then Pb:=P else Pb^.n:=P; Pe:=P; end; Until St=Pend; {} {...} {} end.