LearnPy Hub
← Input problems
Medium

Print a Grid

Read r and c and print an r × c grid where each cell is its number 1, 2, 3, … right-aligned in width 3.

Input

Two integers on one line.

Output

r lines.

Sample 1

Input
3 4
Output
  1  2  3  4
  5  6  7  8
  9 10 11 12

Sample 2

Input
1 1
Output
  1
solution.py
Output appears here
Print a Grid · Python practice problem · LearnPy Hub