Result

WA

Duration

858ms

Code [DL]

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

stdin

30
82

stdout

stderr

Traceback (most recent call last):
  File "/volume/CODE", line 3, in <module>
    s='*'*w+q
NameError: name 'q' is not defined

strace