Result

WA

Duration

940ms

Code [DL]

h=int(input())
w=int(input())
s='*'*w
print(s+('*'+' '*(w-2)+'*\n')*(h-2)+s)

stdin

10
31

stdout

********************************                             *
*                             *
*                             *
*                             *
*                             *
*                             *
*                             *
*                             *
*******************************

stderr