uses crt;
const N=10;
var a:array [1..N] of integer;
x,pos,max:integer;
begin
randomize;
for x:=1 to N do
begin
a[x]:=random(11);
writeln('a[',x,']:',a[x]);
end;
max:=1;
for x:=1 to N do
if a[x]>a[max] then max:=x;
pos:=a[1];
a[1]:=a[max];
a[max]:=pos;
writeln;
for x:=1 to N do
writeln('a[',x,']:',a[x]);
end.