You are given an array $$$a$$$ of length $$$n$$$.
Your task is, for each $$$k \in \{1, \ldots, n\}$$$, to find the subsequence of length $$$k$$$ with the maximum Greatest Common Divisor.
The first line contains a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^5$$$) — the length of the array.
The second line contains $$$n$$$ integers $$$a_1, \dots, a_n$$$ ($$$1 \le a_i \le 2 \cdot 10^5$$$) — elements of array $$$a$$$.
Output $$$n$$$ integers — the maximum Greatest Common Divisor for each $$$k$$$.
7 3 4 9 6 8 2 3
9 4 3 3 1 1 1
Elements highlighted in orange are one of the optimal subsequences: