Program a1;
var a,b: array [1..10] of integer;
n,i,k,sum,c: integer;
begin
Randomize;
For i:=1 to 10 do
begin
a[i]:=random(100);
write(a[i]:3);
end;
Readln (n);
For i:=1 to 10 do
begin
k:=a[i];
while k>0 do
begin
sum:=sum+(k mod 10);
k:=k div 10;
end;
f (n=sum) then
begin
inc(c);
b[c]:=a[i];
end;
end;
for i:=1 to c do
write(b[i]:2);
end.