Var
a : array[1..10] of integer;
m, i, mi: integer;
begin
for i := 1 to 10 do
read(a[i])
m:=-maxint;
for i := 1 to 10 do
if (a[i]>m) then begin
m:=a[i];
mi:=i;
end;
for i := 1 to 10 do
if (a[i] mod 2 = 0) then a[i] := m;
writeln(m,' ',mi);
for i:= 1 to 10 do
write(a[i],' ');
readln;
end.