You are given an integer array of size N. Transform it by adding the last element to the odd numbers.

You are given an integer array of size N. Transform it by adding the last element to the odd numbers. Do not change the first and last element of the array.

var i,N: integer;
a:array[1..10000] of integer;
readln(N);
begin
for i:= 2 to N-1 do
if a[i] mod 2= 1 then
a[i]:=a[i]+a[N];
for i:= 1 to N do begin
writeln(a[i]);
end;
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.