CF291D Parallel Programming

Description

Polycarpus has a computer with $ n $ processors. Also, his computer has $ n $ memory cells. We'll consider the processors numbered by integers from 1 to $ n $ and that the memory cells are consecutively numbered by integers from 1 to $ n $ . Polycarpus needs to come up with a parallel program model. For each memory cell number $ i $ this program must record the value $ n-i $ to this cell. In other words, for each cell you've got to find the distance to cell $ n $ . Let's denote the value that is written in the $ i $ -th cell as $ a_{i} $ . Initially, $ a_{i}=1 $ $ (1

Input Format

The first line contains two space-separated integers $ n $ and $ k $ $ (1

Output Format

Print exactly $ n·k $ integers in $ k $ lines. In the first line print numbers $ c_{1},c_{2},...,c_{n} $ $ (1