Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys

H,W = map(int, raw_input().split())
while H>0 or W>0:
 for y in xrange(W):
  for x in xrange(H):
   if (W+H)%2==0 : print "#"
   else : print "."
  print
 print


Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''

Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys

H,W = map(int, raw_input().split())
while H>0 or W>0:
 for y in xrange(W):
  for x in xrange(H):
   if (W+H)%2==0 : print "#"
   else : print "."
  print
 print


Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''

Buggy python submission (verdict: Runtime Error):
H, W = map(int, raw_input().split())
 
while H > 0 or W > 0 :
    for y in xrange(H) :
        for x in xrange(W) :
            if (x + y) % 2 == 0 :
                sys.stdout.write("#")
            else :
                sys.stdout.write(".")
 
        print
    print
 
    H, W = map(int, raw_input().split())




Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''

Buggy python submission (verdict: Runtime Error):
H, W = map(int, raw_input().split())
 
while H > 0 or W > 0 :
    for y in xrange(H) :
        for x in xrange(W) :
            if (x + y) % 2 == 0 :
                sys.stdout.write("#")
            else :
                sys.stdout.write(".")
 
        print
    print
 



Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''

Buggy python submission (verdict: Runtime Error):
H, W = map(int, raw_input().split())
 
while H > 0 or W > 0 :
    for y in xrange(H) :
        for x in xrange(W) :
            if (x + y) % 2 == 0 :
                sys.stdout.write("#")
            else :
                sys.stdout.write(".")
 
        print
    print
 



Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''

Buggy python submission (verdict: Runtime Error):
import sys 
line = sys.stdin.readline() 
while line : 
 H,W = map(int,line.split()) 
 if H == 0 and W == 0: break;
  for i in range(0,H):
   for j in range(0,W):
    if (i+j)%2 == 0: sys.stdout.write("#") 
    else: sys.stdout.write(".") 
          print ""
	print ""
 line = sys.stdin.readline()


Fixed submission:
while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''