#CCBCHBA0000096. Logical Sequence 2

Logical Sequence 2

Logical Sequence 2

Source: beecrowd

Version: Phuoc Hung OJ Extended

Problem Statement

Given x,yx,y with x<yx<y, print integers 1 through yy in ascending order, at most xx integers per line. Start a new line after every complete group of xx; also print the remaining last group, if any. Use exactly one space between numbers and no trailing spaces.

Input

One line contains two integers xx and yy in this order.

Output

Print numbers 1..yy, with xx per full line and possibly fewer on the final line.

Subtasks

  • Subtask 1 (20%): 1≤x<y≤31\le x<y\le 3.

  • Subtask 2 (30%): 1≤x<y≤101\le x<y\le 10.

  • Subtask 3 (50%): 1≤x<y≤3001\le x<y\le 300.

Examples

Example 1

Input:

3 8

Output:

1 2 3
4 5 6
7 8

Explanation:

Consecutive integers are split into groups of x; the last group may have fewer elements. For this sample, the input is 3 8; the displayed rows follow these rules exactly.

Example 2

Input:

2 5

Output:

1 2
3 4
5

Explanation:

Consecutive integers are split into groups of x; the last group may have fewer elements. For this sample, the input is 2 5; the displayed rows follow these rules exactly.