Buggy python submission (verdict: Runtime Error):
while True:
    try:
	h = 0
	for i in range(10):
            tmp = raw_input()
            if sum(int(tmp)) != 0:
                a[h] = tmp
		h += 1
      	if h == 4:
	    print "B"
	elif h == 1:
	    print "C"
	elif h == 2:
            c = int(a[0])/int(a[1])
            if c == 1:
            	print "A"
	    elif c == 10:
		print "E"
	    elif c == 0:
            	print "G"
	else:
	    c = int(a[0])/int(a[2])
	    if c ==	10:
            	print "F"
	    else:
            	print "D"

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
	h = 0
	for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
		h += 1
      	if h == 4:
	    print "B"
	elif h == 1:
	    print "C"
	elif h == 2:
            c = int(a[0])/int(a[1])
            if c == 1:
            	print "A"
	    elif c == 10:
		print "E"
	    elif c == 0:
            	print "G"
	else:
	    c = int(a[0])/int(a[2])
	    if c ==	10:
            	print "F"
	    else:
            	print "D"

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h = 0
        for i in range(8):
            tmp = raw_input()
            if tmp.count(1) = 0:
                a[h] = tmp
                h += 1
        if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index(1) - a[1].index(1)
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index(1) - a[2].index(1)
            print "D" if c == 1 else "F"
        else:
            print "B"

    except:
        break

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h = 0
        for i in range(8):
            tmp = raw_input()
            if int(tmp) = 0:
                a[h] = tmp
                h += 1
        if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index(1) - a[1].index(1)
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index(1) - a[2].index(1)
            print "D" if c == 1 else "F"
        else:
            print "B"

    except:
        break

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h = 0
        for i in range(8):
            tmp = raw_input()
            if int(tmp) = 0:
                a[h] = tmp
                h += 1
        if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"

    except:
        break

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Buggy python submission (verdict: Runtime Error):
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
            a[h] = tmp
            h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break

Fixed submission:
while True:
    try:
        h = 0
        a=["","","",""]
        for i in range(8):
            tmp = raw_input()
            if int(tmp) != 0:
                a[h] = tmp
                h += 1
    	if h == 1:
            print "C"
        elif h == 2:
            c = a[0].index("1") - a[1].index("1")
            if c == 0:
                print "A"
            elif c == -1:
                print "E"
            else:
                print "G"
        elif h == 3:
            c = a[0].index("1") - a[2].index("1")
            print "D" if c == 1 else "F"
        else:
            print "B"
    	raw_input()
    except:
	break