#CCBCHBAHAI0000053. Trace mảng tích lũy lồng nhau (Trace a Nested Accumulation Array)

    ID: 971 Loại: Thông thường 2000ms 256MiB Tried: 0 Đã chấp nhận: 0 Độ khó: 1 Đăng bởi: Nhãn>Programming language basicsStatic arraysIteration techniquesImplementation techniquesInteger arithmetic

Trace mảng tích lũy lồng nhau (Trace a Nested Accumulation Array)

Trace a Nested Accumulation Array (Trace mảng tích lũy lồng nhau)

Source: Programming in C

Version: Phuoc Hung OJ Extended

Problem

Given integers nn and xx, consider an array bb of length nn, indexed from 00 to n−1n-1. Initially,

b0=x,bj=0(1≤j<n).b_0=x,\qquad b_j=0\quad (1\le j<n).

Then execute the following nested accumulation exactly: for j=0,1,…,n−1j=0,1,\ldots,n-1, and for every ii with 0≤i<j0\le i<j in increasing order, perform

bj←bj+bi.b_j\leftarrow b_j+b_i.

When bjb_j is processed, b0,…,bj−1b_0,\ldots,b_{j-1} already contain their updated values. Hence, for j≥1j\ge1,

bj=∑i=0j−1bi.b_j=\sum_{i=0}^{j-1}b_i.

Print the final array bb.

Input

One line contains integers nn and xx.

Output

Print b0,b1,…,bn−1b_0,b_1,\ldots,b_{n-1} on one line.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10, ∣x∣≤100|x|\le100.

Subtask 2 (30 points): 1≤n≤251\le n\le25, ∣x∣≤104|x|\le10^4.

Subtask 3 (50 points): 1≤n≤401\le n\le40, ∣x∣≤106|x|\le10^6.

Example

Input

10 1

Output

1 1 2 4 8 16 32 64 128 256

Explanation

The sample follows the definitions and rules above.