i=input() print'Z'*i for j in range(i-2):print(i-2-j)*' '+'Z' if i>1:print'Z'*i