#CCBCHBAHAI0000131. Điền mảng IV (Array Fill IV)

Điền mảng IV (Array Fill IV)

Array Fill IV

Source: beecrowd

Version: Phuoc Hung OJ Extended

Problem Statement

Read exactly 1515 integers in their input order. Maintain two temporary arrays, each with capacity 55:

  • par stores even values;
  • impar stores odd values.

Each value is appended to the corresponding temporary array. Whenever one temporary array reaches exactly 55 elements, immediately print all five elements in their stored order using indices from 00 through 44, then clear that temporary array so it can be reused for later values of the same parity.

After all 1515 values have been processed, some elements may remain in the temporary arrays. Print the remaining odd values first, then the remaining even values. The original order within each parity group must be preserved.

Input

The input contains exactly 1515 lines, each containing one integer xix_i.

Output

Print each value on its own line using exactly one of the forms

par[i] = x

or

impar[i] = x

where ii is the current index in the temporary array and restarts at 00 after that array is flushed at size 55.

Subtasks

Subtask 1 (100 points): exactly 1515 integers are given and −109≤xi≤109-10^9\le x_i\le10^9. The magnitude bound is a PHOJ data configuration; the partitioning, flushing, and output order are unchanged.

Examples

Input

1
3
4
-4
2
3
8
2
5
-7
54
76
789
23
98

Output

par[0] = 4
par[1] = -4
par[2] = 2
par[3] = 8
par[4] = 2
impar[0] = 1
impar[1] = 3
impar[2] = 3
impar[3] = 5
impar[4] = -7
impar[0] = 789
impar[1] = 23
par[0] = 54
par[1] = 76
par[2] = 98

Explanation

The first five even values are 4,−4,2,8,24,-4,2,8,2. When the fifth even value arrives, par is full, so those five lines are printed immediately.

The first five odd values are 1,3,3,5,−71,3,3,5,-7. When -7 is read, impar becomes full and is printed.

The remaining odd values are 789,23789,23, while the remaining even values are 54,76,9854,76,98. At the end, the remaining odd values are printed before the remaining even values.