Identification Division.
Program-ID. caddi2018d.

Data Division.
Working-Storage Section.

77 n pic 9(6).
77 a pic 9(10).
77 e pic 9 value zero.

Procedure Division.

accept n.

perform n times
  accept a
  if function mod(a 2) not= zero
    move 1 to e
    exit perform
  end-if
end-perform.

if e = 0
  display 'second'
else
  display 'first'
end-if.

stop run.
