Buggy python submission (verdict: Runtime Error):
while 1:
  W, H = map(int, raw_input().split())
  if W = H = 0:
    break
  for i in range(H):
    if i = 0 or i = H-1:
      print "#"
    else
      print "#" + "" * (W-2) + "H"

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  W, H = map(int, raw_input().split())
  if W == 0 and H == 0:
    break
  for i in range(H):
    if i == 0 or i == H-1:
      print "#"
    else
      print "#" + "" * (W-2) + "H"

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  W, H = map(int, raw_input().split())
  if W == 0 and H == 0:
    break
  for i in range(H):
    if i == 0 or i == H-1:
      print "#"
    else
      print "#" + " " * (W-2) + "H"

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  W, H = map(int, raw_input().split())
  if W == 0 and H == 0:
    break
  for i in range(H):
    if i == 0 or i == H-1:
      print "#" * W
    else
      print "#" + " " * (W-2) + "H"

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  W, H = map(int, input().split())
  if W == 0 and H == 0:
    break
  print ("#"*W)
  for i in range(1, H-1):
    print ("#" + ("." * (W-2)) + "#")
  print ("#"*W)
  print ("")

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  H, W = map(int, input().split())
  if W == 0 and H == 0:
    break
  print ("#"*W)
  for i in range(1, H-1):
    print ("#" + ("." * (W-2)) + "#")
  print ("#"*W)
  print ("")

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  H, W = map(int, input().split())
  if W == 0 and H == 0:
    break
  print ("#"*W)
  for i in range(1, H-1):
    print ("#" + ("." * (W-2)) + "#")
  print ("#"*W)
  print ("")

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""

Buggy python submission (verdict: Runtime Error):
while 1:
  H, W = map(int, input().split())
  if W == 0 and H == 0:
    break
  print "#"*W
  for i in range(1, H-1):
    print ("#" + ("." * (W-2)) + "#")
  print "#"* W
  print ""

Fixed submission:
while 1:
   H, W = map(int, raw_input().split())
   if H == 0 and W == 0:
      break
   print "#"*W
   for i in range(1, H-1):
      print ("#"+"."*(W-2)+"#")
   print "#"*W
   print ""