# Author:
# Date:
# Exam 1, Problem 3 (5 of 20 points)

""" This program prints a square of symbols, separated by horizontally by
spaces. All of the symbols are zeros, with two exceptions:
 - The diagonal elements of the grid are * instead of 0
 - The element at a specified row and column is also * instead of 0

The program takes three positive integer arguments:
 - The first argument is the size (i.e., side length) of the grid.
 - The second and third arguments are the row and column numbers of the one
   special case symbol that is to be a * instead of a 0. Rows and columns are
   indexed starting at 1.

For example:
>>> %Run p3.py 4 1 3
* 0 * 0 
0 * 0 0 
0 0 * 0 
0 0 0 * 

The first argument is 4, indicating the grid should be 4x4.
The second and third arguments (1 and 3) specify that the symbol in row 1,
column 3 should be a * instead of a 0.

More examples:


%Run p3.py 3 2 1
* 0 0 
* * 0 
0 0 *
>>> %Run p3.py 3 2 2
* 0 0 
0 * 0 
0 0 * 
>>> %Run p3.py 5 1 5
* 0 0 0 * 
0 * 0 0 0 
0 0 * 0 0 
0 0 0 * 0 
0 0 0 0 * 
"""

import sys

size = int(sys.argv[1])
special_row = int(sys.argv[2])
special_col = int(sys.argv[3])

for row in range(1, size+1):
    for col in range(1, size+1):

        if row == col or (row == special_row and col == special_col):
            char = "*"
        else:
            char = "0"
            
        print(char, end=" ")
    print()
