uses crt;
var
a:array [1..9] of integer;
i,c,m,n:integer;
b:real;
begin
clrscr;
randomize();
c:=1;
for i:=1 to 9 do
begin
if i=c then
begin
a[i]:=500;
c:=c+3;
end
else
begin
if i mod 3=0 then a[i]:=trunc(i/3) else a[i]:=trunc(sqrt(a[i-1]));
end;
write(a[i],' ');
end;
readln();
end.