#CCBCHBA0000088. Khung rỗng (Hollow Frame)

Khung rỗng (Hollow Frame)

Hollow Frame

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given r,cr,c, print a grid of rr rows and cc columns. A cell on the first or last row or first or last column is #; any other cell is .. Indices start at 1. If r=1r=1 or c=1c=1, every cell is on the border. Do not print spaces between characters.

Input

One line contains integers rr (rows) and cc (columns).

Output

Print exactly rr lines of cc characters.

Subtasks

  • Subtask 1 (20%): 1≤r,c≤21\le r,c\le 2.

  • Subtask 2 (30%): 1≤r,c≤81\le r,c\le 8.

  • Subtask 3 (50%): 1≤r,c≤301\le r,c\le 30.

Examples

Example 1

Input:

3 4

Output:

####
#..#
####

Explanation:

The first and last rows are entirely on the border; interior rows have # at each end. A one-row grid is all border. For this sample, the input is 3 4; the displayed rows follow these rules exactly.

Example 2

Input:

1 3

Output:

###

Explanation:

The first and last rows are entirely on the border; interior rows have # at each end. A one-row grid is all border. For this sample, the input is 1 3; the displayed rows follow these rules exactly.