Formal Fring

Time limit: 0.5s Memory limit: 256MB Input: Output:

I don't think we're alike at all, Mr. White. You're not a cautious man at all... You have poor judgement. I cannot work with someone with poor judgement.

  • Gustavo Fring, Breaking Bad

Gus Fring is a very careful man. He doesn't mess with you. When he asks someone to solve a problem, he gives a completely formal statement. And today he asked YOU.

For a positive integer nn, define highest_bit(n)highest\_bit(n) as the largest number ii, such that 2in2^i \leq n. Also define highest_bit(0)=1highest\_bit(0) = -1.

You are given a positive integer XX. Find the number of multisets SS of positive integers, which satisfy the following conditions:

  • All elements of SS are nonnegative powers of 22.
  • The sum of elements of SS is XX.
  • There is no way to split elements of SS into two groups so that highest_bit(S1)=highest_bit(S2)highest\_bit(S_1) = highest\_bit(S_2), where S1S_1 is the sum of the elements in the first group, and S2S_2 is the sum of the elements in the second group.

Solve this problem for X=1,2,,nX = 1, 2, \dots, n.

Since the answers can be very large, output them modulo 998 244 353998 \ 244 \ 353.

Input data

The only line of the input contains a single integer nn (1n1061 \leq n \leq 10^6).

Output data

Output nn integers: answers to the problem for X=1,2,,nX = 1, 2, \dots, n, modulo 998 244 353998 \ 244 \ 353.

Example

stdin

10

stdout

1 1 2 1 1 3 6 1 1 2

Log in or sign up to be able to send submissions!