#C3943. Diamond Pattern
Diamond Pattern
Diamond Pattern
Given a positive integer \( n \), print a diamond shape composed of asterisks. The diamond has a total height and width of \( 2n - 1 \). The top half of the diamond (including the middle line) consists of \( n \) rows, and the bottom half consists of \( n-1 \) rows. Each line is padded with spaces so that the diamond is symmetric.
Example:
Input: 3Output: *
Your task is to read the integer \( n \) from the standard input and print the diamond pattern to the standard output exactly as shown.
inputFormat
The input consists of a single integer \( n \) which represents the number of rows in the top half of the diamond.
Input is provided via standard input.
outputFormat
Output the diamond pattern corresponding to the input \( n \). Each line of the diamond should contain a combination of spaces and asterisks, following the pattern rules.
Output should be printed to standard output.
## sample1
*