Problem H: 打印网格

Problem H: 打印网格

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定两个整数 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">m,请打印一个 lns="http://www.w3.org/1998/Math/MathML">n 行 lns="http://www.w3.org/1998/Math/MathML">m 列的空心栅格网络。例如 lns="http://www.w3.org/1998/Math/MathML">n=2 且 lns="http://www.w3.org/1998/Math/MathML">m=3 时应该输出:

+-+-+-+
| | | |
+-+-+-+
| | | |
+-+-+-+

Input

两个整数:表示 lns="http://www.w3.org/1998/Math/MathML">n 与 lns="http://www.w3.org/1998/Math/MathML">m1≤n,m≤100

Output

根据题意输出规模为 lns="http://www.w3.org/1998/Math/MathML">n×m 的空心栅格网络。

Sample Input Copy

2 3

Sample Output Copy

+-+-+-+
| | | |
+-+-+-+
| | | |
+-+-+-+