Buggy python submission (verdict: Runtime Error):
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%5==0: return "Buzz"
	if n%3==0: return "Fizz"
	return str(n)

while 1:
	m,n=map(int,raw_input().split())
	if m==0:break
	player=[i+1 for i in range(m)]
	for i in range(n):
		if fizzbuzz(i+1)!=raw_input():
			player.pop((i-(m-len(player)))%len(player))
			if len(player)==1:
				break
	print " ".join(map(str,player))
		

Fixed submission:
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%3==0: return "Fizz"
	if n%5==0: return "Buzz"
	return str(n)
while 1:
	try:
		m,n=map(int,raw_input().split())
		if m==0:break
		player=range(1,m+1)
		p=0
		for i in range(n):
			if fizzbuzz(i+1)!=raw_input():
				del player[p]
				m=len(player)
				if m==1:
					break
				p%=m
			else:
				p=(p+1)%m
		print " ".join(map(str,player))
	except:
		pass

Buggy python submission (verdict: Runtime Error):
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%5==0: return "Buzz"
	if n%3==0: return "Fizz"
	return str(n)

while 1:
	m,n=map(int,raw_input().split())
	if m==0:break
	player=range(1,m+1)
	for i in range(n):
		if len(player)>1:
			if fizzbuzz(i+1)!=raw_input():
				player.pop((i-(m-len(player)))%len(player))
	print " ".join(map(str,player))

Fixed submission:
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%3==0: return "Fizz"
	if n%5==0: return "Buzz"
	return str(n)
while 1:
	try:
		m,n=map(int,raw_input().split())
		if m==0:break
		player=range(1,m+1)
		p=0
		for i in range(n):
			if fizzbuzz(i+1)!=raw_input():
				del player[p]
				m=len(player)
				if m==1:
					break
				p%=m
			else:
				p=(p+1)%m
		print " ".join(map(str,player))
	except:
		pass

Buggy python submission (verdict: Runtime Error):
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%5==0: return "Buzz"
	if n%3==0: return "Fizz"
	return str(n)

while 1:
	m,n=map(int,raw_input().split())
	if m==0:break
	player=range(1,m+1)
	for i in range(n):
		if len(player)==1:
			break
		if fizzbuzz(i+1)!=raw_input():
			del player[(i-(m-len(player)))%len(player)]
	print " ".join(map(str,player))

Fixed submission:
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%3==0: return "Fizz"
	if n%5==0: return "Buzz"
	return str(n)
while 1:
	try:
		m,n=map(int,raw_input().split())
		if m==0:break
		player=range(1,m+1)
		p=0
		for i in range(n):
			if fizzbuzz(i+1)!=raw_input():
				del player[p]
				m=len(player)
				if m==1:
					break
				p%=m
			else:
				p=(p+1)%m
		print " ".join(map(str,player))
	except:
		pass

Buggy python submission (verdict: Runtime Error):
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%5==0: return "Buzz"
	if n%3==0: return "Fizz"
	return str(n)

while 1:
	m,n=map(int,raw_input().split())
	if m==0:break
	player=range(1,m+1)
	p=0
	for i in range(n):
		if len(player)==1:
			break
		if fizzbuzz(i+1)!=raw_input():
			del player[p]
			p%=len(player)
		else:
			p=(p+1)%len(player)
	print " ".join(map(str,player))

Fixed submission:
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%3==0: return "Fizz"
	if n%5==0: return "Buzz"
	return str(n)
while 1:
	try:
		m,n=map(int,raw_input().split())
		if m==0:break
		player=range(1,m+1)
		p=0
		for i in range(n):
			if fizzbuzz(i+1)!=raw_input():
				del player[p]
				m=len(player)
				if m==1:
					break
				p%=m
			else:
				p=(p+1)%m
		print " ".join(map(str,player))
	except:
		pass