We’re preparing your current view and syncing the latest data.
You are given two integers n and m representing a grid of n rows and m columns. Your task is to draw a square of size n x m with the top-left corner at position (1,1). The corners of the square should be marked with '+'. The top and bottom edges should be filled with '-' characters, and the left and right edges should be filled with '|' characters. The inside cells of the square remain empty (filled with '.').
The input consists of two integers n and m (2 ≤ n, m ≤ 100) separated by a space, representing the size of the square.
Output the square pattern with the specified markings as described. The corners should be '+', edges '-' or '|', and the inside filled with '.' characters.
2 ≤ n, m ≤ 100
Example 1
Input
4 4
Output
+--+ |..| |..| +--+
Explanation
A 4x4 square with corners '+', horizontal edges '-', vertical edges '|', and inside '.'