def diamond(n):
    """
    print a diamond pattern with asterisks of given size (must be odd)
    if not odd, return ""

    example:
    diamond(3)
    #  *
    # ***
    #  *
    """
    # TODO: Implement this function
    if n % 2 == 0:
    	return ""
    
    for i in range(1, n + 1, 2):
    	spaces = (n - i) // 2
    	print(" " * spaces + "*" * i + " " * spaces)
    	
    for i in range(n-2, 0, -2):
    	spaces = (n - i) // 2
    	print(" " * spaces + "*" * i + " " * spaces)


# ===== Provided by the TA. Do not modify. =====
import io
import sys


def main() -> None:
    n = int(input())
    captured = io.StringIO()
    real_stdout = sys.stdout
    sys.stdout = captured  # everything diamond() prints is collected here
    try:
        diamond(n)
    finally:
        sys.stdout = real_stdout
    for line in captured.getvalue().splitlines():
        print(line.rstrip())  # spaces at the end of a line are ignored


main()
