procedure first(i:longint); begin write(a[i]); ifa[i*2]0then first(i*2); ifa[i*2+1]0then first(i*2+1); end;procedure mid(i:longint); begin if a[i*2]0 then mid(i*2); write(a[i]); if a[i*2+1]0 then mid(i*2+1); end;procedure last(i:longint); begin if a[i*2]0 then last(i*2); if a[i*2+1]0 then last(i*2+1); write(a[i]); end;