#P11770. Snow Accumulation on Window Sills

    ID: 13865 Type: Default 1000ms 256MiB

Snow Accumulation on Window Sills

Snow Accumulation on Window Sills

There are \(n\) window sills numbered from \(1\) (top) to \(n\) (bottom). Initially, only the top level (level \(1\)) contains a single snowball of volume \(1\), while all other levels are empty.

Then, \(n\) transformations occur. In the \(i\)-th transformation, every snowball on level \(i\) is rolled up. Due to a mysterious physical phenomenon, for each rolled snowball with volume \(V\), every window sill whose index is an integer multiple of \(i\) (except for level \(i\) itself) will receive a new snowball. Specifically, let the set of receiving levels be \[ M_i = \{ k : k = i \times t,\; t \ge 2,\; k \le n \}, \] which, when sorted in descending order, yields levels \(k_1 > k_2 > \cdots > k_m\). Then level \(k_1\) receives a snowball of volume \(V+1\), level \(k_2\) receives a snowball of volume \(V+2\), and so on. Finally, the original snowball magically returns to level \(i\), so the snow on level \(i\) remains unchanged during that transformation.

Your task is to determine the maximum volume among all snowballs on each window sill after all \(n\) transformations.

inputFormat

The input consists of a single integer \(n\) representing the number of window sills.

outputFormat

Output \(n\) space-separated integers. The \(i\)-th integer should be the maximum volume of a snowball on level \(i\) after all transformations.

sample

4
1 4 3 5