Program Z1;
uses crt;
var A:array [1..7] of integer;
x,z,i:integer;
begin
ClrScr;
for i:=1 to 7 do
readln (A[i]);
Clrscr;
write (A[i]:4);
writeln;
if A[i]=49 then x:=i;
z:=A[1];
A[1]:=A[x];
A[x]:=z;
readln
end.
Program Z1;
uses crt;
var A:array [1..7] of integer;
x,z,i:integer;
begin
ClrScr;
for i:=1 to 7 do
readln (A[i]);
Clrscr;
for i:=1 to 7 do
write (A[i]:4);
writeln;
for i:=1 to 7 do
if A[i]=49 then x:=i;
z:=A[1];
A[1]:=A[x];
A[x]:=z;
for i:=1 to 7 do
write (A[i]:4);
readln
end.