Buggy python submission (verdict: Runtime Error):
import sys
while(1):
  H,W = map(int, raw_input().split())
  if H==0 and W==0:
    break
  for i in range(H):
    sys.stdout.white("#")
    for j in range(1,W-1):
      if i == 1 or i == H:
        sys.stdout.write("#")
      else:
        sys.stdout.write(".")
    sys.stdout.white("#")
    print ""
  print ""    

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

Buggy python submission (verdict: Runtime Error):
import sys
while(1):
  H,W = map(int, raw_input().split())
  if H==0 and W==0:
    break
  for i in range(H):
    sys.stdout.white("#")
    for j in range(1,W-1):
      if i == 1 or i == H:
        sys.stdout.write("#")
      else:
        sys.stdout.write(".")
    sys.stdout.white("#\n")
  print ""    

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

Buggy python submission (verdict: Runtime Error):
import sys
while(1):
  H,W = map(int, raw_input().split())
  if H==0 and W==0:
    break
  for i in range(H):
    sys.stdout.white("#")
    for j in range(2,W-1):
      if i == 1 or i == H:
        sys.stdout.write("#")
      else:
        sys.stdout.write(".")
    sys.stdout.white("#\n")
  print ""    

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

Buggy python submission (verdict: Runtime Error):
import sys
while(1):
  H,W = map(int, raw_input().split())
  if H==0 and W==0:
    break
  for i in range(H):
    sys.stdout.white("#")
    for j in range(2,W-1):
      if i == 1 or i == H:
        sys.stdout.write("#")
      else:
        sys.stdout.write(".")
    sys.stdout.white("#\n")
  sys.stdout.white("\n")

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

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

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

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

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