Page not loading? Try clicking here.
Placeholder

#5801

Simple Card Shuffle 1s 4MB

Problems

There is a deck of cards numbered from 1 to N stacked in order.

  • The top card of the deck is 1.

  • The bottom card is N.

The shuffler performs the following operation repeatedly:

  1. Give the top card of the deck to the player.

  2. Move the next top card to the bottom of the deck.

Repeat these steps until all cards are given to the player.

Given the number of cards N, print the order of the cards that the player receives.


Input

The first line contains N, the number of cards. (1 ≤ N ≤ 100)


Output

Print the numbers of the cards received by the player in order, separated by spaces.


Example #1

3
1 3 2

Example #2

6
1 3 5 2 6 4


Source

klee

You must sign in to write code.