• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Занятие 7. Two -dimensional arrays

Difficulty level:

Task«Sorting words»

You work as a storekeeper in a large warehouse. Every day, new products are received at the warehouse, which must be placed correctly. The warehouse is a matrix where each line corresponds to a separate category of goods, and each element in the line & ndash; This is a unique article of goods. For the convenience of searching and storage, you decided to streamline goods in each category in an increase in the article.
rn

Input format

first the number & nbsp; n & nbsp;-the number of product categories (lines in the matrix). Then, for each category, the number of & nbsp; m & nbsp;- the quantity of goods in this category (the number of elements in the line). After that, & nbsp; m of integers representing articles of goods in this category

Output format

The program should derive a matrix in which each line is sorted by increasing. Articles of goods in each line should be divided by spaces

Example

Input

3
5
5 2 9 1 5
4
8 3 0 2
3
7 4 1

Output

1 2 5 5 9
0 2 3 8
1 4 7

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

Помощник ИИ

Привет! Я твой помощник по программированию. Задавай любые вопросы по Python, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!