Var
f1,f2:file of integer; k,m,s:integer;
begin
assign(f1,'f1.dat'); reset(f1);
assign(f2,'f2.dat'); rewrite(f2);
while not eof(f1) do
begin
read(f1,k);
s:=0;m:=k;
while m>0 do begin s:=s+m mod 10; m:=m div 10; end;
if (s>12)and(s<34) then write(f2,k);<br>close(f1); close(f2);
end.