import java.io.*;

public class Q12
{
    public static void main (String[] args) throws IOException
    {
	BufferedReader input = new BufferedReader (new FileReader ("DATA1.txt"));
	PrintWriter output = new PrintWriter (new FileWriter ("OUT1.txt"));

	int num[] = new int [5];

	for (int datal = 0 ; datal < 5 ; datal++)
	{
	    int height = Integer.parseInt (input.readLine ());
	    int maxrow = (height - 1) / 2;
	    int length = 1;
	    // 0 to maxrow row
	    for (int i = 0 ; i <= maxrow ; i++)
	    {
		//int numpo = 2 * i + 1;
		int before = (height - length) / 2;

		for (int j = 0 ; j < before ; j++)
		    output.print (".");
		for (int j = before ; j < length + before ; j++)
		{
		    output.print ("#");
		}
		for (int j = length + before ; j < height ; j++)
		    output.print (".");
		output.println ();
		length += 2;
	    }

	    //remaining
	    length -= 4;
	    for (int i = maxrow + 1 ; i < height ; i++)
	    {
		int before = (height - length) / 2;

		for (int j = 0 ; j < before ; j++)
		    output.print (".");

		for (int j = before ; j < length + before ; j++)
		{
		    output.print ("#");
		}

		for (int j = length + before ; j < height ; j++)
		    output.print (".");

		length -= 2;
		output.println ();
	    }
	}
	output.close ();
	input.close ();
    }


    public static void fill (char[] [] arr, char ch)
    {
	for (int i = 0 ; i < arr.length ; i++)
	{
	    for (int j = 0 ; j < arr [i].length ; j++)
	    {
		arr [i] [j] = ch;
	    }
	}
    }


    public static void printarr (char[] [] arr)
    {
	for (int a = 0 ; a < arr.length ; a++)
	{
	    for (int b = 0 ; b < arr [a].length ; b++)
	    {
		System.out.print (arr [a] [b]);
	    }
	    System.out.println ();
	}
    }


    public static void draw (int row, int length, char[] [] arr)
    {
	//left
	for (int i = (arr [row].length - 1) / 2 ; i >= (((arr [row].length - 1) / 2) - ((length - 1) / 2)) ; i--)
	{
	    System.out.println (((arr [row].length - 1) / 2) - ((length - 1) / 2));

	    arr [row] [i] = '#';
	}

	//right

	for (int i = (arr [row].length - 1) / 2 ; i <= (((arr [row].length - 1) / 2) + ((length - 1) / 2)) ; i++)
	{
	    arr [row] [i] = '#';
	}
    }
}

