program z14_9;
uses crt;
const t=100;
type rec=record
city:string;
long:byte;
cost:real;
end;
list=array[1..t] of rec;
var a:list;
n:byte;
procedure init(var X:list; var k:byte);
var f:text;
s:string;
er:integer;
BEGIN
assign(f,'h:\test.txt');
reset(f);
k:=0;
while not eof(f) do begin
readln(f,s);
inc(k);
with X[k] do begin
city:=copy(s,1,pos(' ',s)-1);
delete(s,1,pos(' ',s)-1);
s:=copy(s,1,pos(' ',s)-1);
val(s,long,er);
writeln('vvedite stoimost',city);
readln(cost);
end;
end;
close(f);
end;
procedure print( var X:list; k:byte);
var i:byte;
f:text;
BEGIN
assign(f,'a:output.txt');
rewrite(f);
for i:=1 to k do
with X[i] do begin
write(f,city,'-');
write(f,long,'dn');
write(f,cost,'ryb');
writeln(f);
end;
close(f);
end;
BEGIN
clrscr;
init(a,n);
print(a,n);
readln;
END.