Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
HERE:
	for {
		max := 0
		shop := 'A'
		for i := 0; i < 5; i++ {
			scanner.Scan()
			buf := strings.Split(scanner.Text(), " ")
			a, _ := strconv.Atoi(buf[0])
			b, _ := strconv.Atoi(buf[1])
			if a == 0 && b == 0 {
				break HERE
			}
			if max < a+b {
				max = a + b
				shop = 'A' + int32(i)
			}
		}
		fmt.Println(string(shop), max)
	}
}

Python: # Aizu Problem 0195: What is the Most Popular Shop in Tokaichi?
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


while True:
    most = 0
    shop = 'A'
    a, b = [int(_) for _ in input().split()]
    if a == b == 0:
        break
    most = a + b
    for s in range(4):
        a = sum([int(_) for _ in input().split()])
        if a > most:
            most = a
            shop = chr(66 + s)
    print(shop, most)

Python: while True:
    a1, a2 = map(int, input().split())
    if a1 == 0:
        break
    ans = 'A'
    maxi = a1+a2
    for i in range(1,5):
        x1, x2 = map(int, input().split())
        if x1+x2 > maxi:
            maxi = x1+x2
            ans = chr(ord('A')+i)
    print(ans,maxi)

Python: while True:
  a,b = map(int,input().split(" "))
  if a == 0 and b == 0: break  
  c,d = map(int,input().split(" "))
  e,f = map(int,input().split(" "))
  g,h = map(int,input().split(" "))
  i,j = map(int,input().split(" "))  

  listsum= [a+b,c+d,e+f,g+h,i+j]
  listsum.sort()
   
  if listsum[-1] == a+b:
    print("A",listsum[-1]) 
  elif listsum[-1] == c+d:
    print("B",listsum[-1]) 
  elif listsum[-1] == e+f:
    print("C",listsum[-1]) 
  elif listsum[-1] == g+h:
    print("D",listsum[-1]) 
  elif listsum[-1] == i+j:
    print("E",listsum[-1])

Python: name = ['A', 'B', 'C', 'D', 'E']
shop = []
  
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0:
        break
    shop.append(a+b)
    if len(shop) == 5:
        m = max(shop)
        print(name[shop.index(m)], m)
        shop = []

Python: name = ['A', 'B', 'C', 'D', 'E']
shop = []

while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0:
        break
    shop.append(a+b)
    if len(shop) == 5:
        m = max(shop)
        print(name[shop.index(m)], m)
        shop = []

Python: S = ["A","B","C","D","E"]
while True:
    L = []
    a,p = map(int,input().split())
    if a == 0:
        break
    L.append(a+p)
    for i in range(4):
        a,p = map(int,input().split())
        L.append(a+p)
    m = max(L)
    s = L.index(m)
    print(S[s],m)

Python: name=['A','B','C','D','E']
shop = []
while True:
 a,b = map(int,input().split())
 if a == 0 and b == 0:
   break
 shop.append(a+b)
 if len(shop) == 5:
   m = max(shop)
   print(name[shop.index(m)],m)
   shop = []

Python: end = 0
while end == 0 :
    shop = -1
    max_s = 0
    for i in range(5) :
        try :
            s1, s2 = map(int, input().split())
        except EOFError :
            end = 1
            break
    
        if s1 + s2 > max_s :
            max_s = s1 + s2
            shop = i
    
    if shop == 0 :
        shop_name = "A"
    elif shop == 1 :
        shop_name = "B"
    elif shop == 2 :
        shop_name = "C"
    elif shop == 3 :
        shop_name = "D"
    elif shop == 4 :
        shop_name = "E"
    if end == 0 :
        print(shop_name, max_s)

Python: name=['A','B','C','D','E']
shop = []
while True:
  a,b = map(int,input().split())
  if a == 0 and b == 0:
    break
  shop.append(a+b)
  if len(shop) == 5:
    m = max(shop)
    print(name[shop.index(m)],m)
    shop = []

Python: while 1:
    a=sum(map(int,input().split()))
    if a==0:break
    a=[a]+[sum(map(int,input().split())) for _ in range(4)]
    b=max(a)
    print(chr(ord('A')+a.index(b)),b)

Python: while True:
    b=[]
    a,c,ans,f,g=0,0,0,0,0
    try:
        for i in range(5):
            f,g=map(int,input().split())
            if f==0 and g==0:
                break
            a=f+g
            b.append(a)
        if a==0 and b==0:
            break
        c=max(b)
        if c==b[0]:
            ans="A"
        if c==b[1]:
            ans="B"
        if c==b[2]:
            ans="C"
        if c==b[3]:
            ans="D"
        if c==b[4]:
            ans="E"
        print(ans,c)
    except:break

Python: try:
    while True:
        num_list = []
        num_di = {}
        
        #リストに数値を格納して１番大きい数を出力する
        for i in range(0,5):
            line = list(map(int,input().split()))
            num_list.append(sum(line))
            num_di[sum(line)] = 65 + i
        num_list.sort()
        print(chr(num_di[num_list[4]]) + " " + str(num_list[4]))

#EOFErrorを検知する
except EOFError:
    pass

Python: while 1:
    a = sum(map(int,input().split()))
    if a == 0:break
    a = [a] + [sum(map(int,input().split())) for _ in range(4)]
    b = max(a)
    print(chr(ord('A')+a.index(b)),b)

Python: 
while True:
    T = []
    am, pm = [int(x) for x in input().split()]
    if am == 0 and pm ==0:
        break
    T.append(am+pm)
    for i in range(4):
        am, pm = [int(x) for x in input().split()]
        T.append(am+pm)
    num = sorted(list(enumerate(T)), key=lambda x: -x[1])[0][0]
    print("ABCDEF"[num], T[num])

Python: name = ['A', 'B', 'C', 'D', 'E']
shop = []
 
while True:
    a,b = map(int, input().split())
    if a == 0 and b == 0:
        break
    shop.append(a+b)
    if len(shop) == 5:
        m = max(shop)
        print(name[shop.index(m)], m)
        shop = []

Python: def solve():
    from sys import stdin
    f_i = stdin
    
    while True:
        s1A, s2A = map(int, f_i.readline().split())
        
        if s1A == 0 and s2A == 0:
            break
        
        sales = [(s1A + s2A, 'A')]
        for shop in 'BCDE':
            cnt = sum(map(int, f_i.readline().split()))
            sales.append((cnt, shop))
        
        cnt, shop = max(sales)
        
        print(f"{shop} {cnt}")

solve()

Python: name = ['A', 'B', 'C', 'D', 'E']
shop = []

while True:
  a,b = map(int, input().split())
  if a == 0 and b == 0:
    break
  shop.append(a+b)
  if len(shop) == 5:
    m = max(shop)
    print(name[shop.index(m)], m)
    shop = []

Python: num = {0: 'A', 1: 'B', 2: 'C', 3: 'D', 4: 'E'}
while True:
    n = [0] * 5
    for i in range(5):
        s1, s2 = map(int, input().split())
        if s1 == s2 == 0: exit()
        n[i] += s1 + s2
    ans = max(n)
    print(num[n.index(ans)], ans)

Python: # AOJ 0195 What is the Most Popular Shop in Tokaich
# Python3 2018.6.20 bal4u

import sys
while True:
	tbl = {}
	for i in range(5):
		s = sum(list(map(int, input().split())))
		if i == 0 and s == 0: sys.exit()
		tbl[chr(ord('A')+i)] = s
	ans = sorted(tbl.items(), key=lambda x: x[1], reverse = True)
	print(*ans[0])

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0195

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    while True:
        am, pm = map(int, input().split())
        if am == 0 and pm == 0:
            break
        totals = [0] * 5
        totals[0] = am + pm
        for i in range(1, 5):
            am, pm = map(int, input().split())
            totals[i] = am + pm

        top = max(totals)
        shop = totals.index(top)

        print('{} {}'.format(chr(ord('A')+shop), top))



if __name__ == '__main__':
    main(sys.argv[1:])

Python: name=['A','B','C','D','E']
shop = []
while True:
  a,b = map(int,input().split())
  if a == 0 and b == 0:
    break
  shop.append(a+b)
  if len(shop) == 5:
    m = max(shop)
    print(name[shop.index(m)],m)
    shop = []