S3P4 - Draw Rectangle

Given dimensions of a rectangle draw an empty rectangle using * with the given dimensions.

Input

Two integers N and M, N is the height and M is the width.

N and M are integers and greater than 0 and do not exceed 100.

Output

Rectangle border with * and empty inside.

Example

Input:
3 4

Output:
****
*  *
****

The output may be not clear but the second line has 4 characters, 2 asterisks at the begin and the end, and 2 spaces in the middle.


Added by:mohamed gamal
Date:2012-01-27
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ASM32-GCC MAWK BC C-CLANG NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JS-MONKEY JULIA KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PYPY3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET

hide comments
2012-07-07 06:53:10 Dicky Djayadi
hi would you check my solution please? thanks
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.