Go: package main

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

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 {
				break HERE
			}
			if max < a + b {
				max = a + b
				shop = 'A' + int32(i)
			}
		}
		fmt.Println(string(shop), max)
	}
}

Python: import sys,os
while 1:
    a = []
    for i in range(5):
        a.append(list(map(int, input().split())))
        if a == [[0,0]]:
            sys.exit(0)

    ans = 0
    abcde = "ABCDE"
    an = ""
    for j,i in enumerate(a):
        if ans < i[0]+i[1]:
            ans = i[0]+i[1]
            an = abcde[j]

    print(an,ans)

Python: store = "ABCDE"

while True:
  s1, s2 = map(int, input().split())
  if s1 == 0 and s2 == 0:
    break
    
  s = store[0]
  ans = s1 + s2
  
  for i in range(4):
    s1, s2 = map(int, input().split())
    if s1 + s2 > ans:
      s, ans = store[i+1], s1 + s2
      
  print(s, ans)

Python: while True:
  try:
      A=[]
      for i in range(5):
        s1,s2=map(int,input().split())
        if s1==0 and s2==0:
          break
        s=s1+s2
        A.append(s)
      if s==0:
        break
      for i in range(len(A)):
        if A[i]==max(A):
          if i==0:
            print("A",A[i])
          if i==1:
            print("B",A[i])
          if i==2:
            print("C",A[i])
          if i==3:
            print("D",A[i])
          if i==4:
            print("E",A[i])
  except EOFError:
      break

Python: dic = {0:"A", 1:"B", 2:"C", 3:"D", 4:"E"}
while True:
  sa = list(map(int, input().split()))
  if sa == [0, 0]:
    break
  lst = [sum(sa)]
  for _ in range(4):
    lst.append(sum(map(int, input().split())))
  print(dic[lst.index(max(lst))], max(lst))

Python: import sys
f = sys.stdin


import operator
while True:
    a = sum(map(int, f.readline().split()))
    if a == 0:
        break
    abcde = [a] + [sum(map(int, f.readline().split())) for i in range(4)]
    print(*max(zip('ABCDE', abcde), key=operator.itemgetter(1)))

Python: while True :
  a, b = map(int, input().split())
  if(a == b and b == 0) :
    break
  else :
    S = ["A", "B", "C", "D", "E"]
    shop = list()
    shop.append(a + b)
    for i in range(4) :
      a, b = map(int, input().split())
      shop.append(a + b)
    win = max(shop)
    Shop = shop.index(win)
    print(S[Shop], win)

Python: if __name__ == '__main__':

	A = ["A","B","C","D","E"]

	while True:
		try:
			n,m = map(int,input().split())
			max_num = n + m
			number = 0

			if n == 0 and m == 0:
				break

			for i in range(4):
				n,m = map(int,input().split())

				if max_num < n + m:
					max_num = n + m
					number = i + 1
			
			print(A[number],max_num)

		except EOFError:
			break

Python: store = "ABCDE"

while 1:
    s1, s2 = map(int, input().split())
    if s1 == 0 and s2 == 0:
        break

    s = store[0]
    ans = s1 + s2

    for i in range(4):
        s1, s2 = map(int, input().split())
        if s1 + s2 > ans:
            s, ans = store[i+1], s1 + s2

    print(s, ans)

Python: s = ["A", "B", "C", "D", "E"]
while True:
  a, b = map(int, input().split())
  if a == 0 and b == 0:
    break
  else:
    m = [0 for i in range(5)]
    m[0] = a + b
    for i in range(1, 5):
      aa, bb = map(int, input().split())
      m[i] = aa + bb
    ans = 0
    mm = 0
    for i in range(5):
      if m[i] > mm:
        mm = m[i]
        ans = i
    print(s[ans], mm)

Python: while True:

    input_data = input()

    if input_data == "0 0":
        break

    input_list = [input().split(" ") for _ in range(4)]
    input_list.insert(0, input_data.split(" "))

    input_list = [(int(count1) + int(count2), char) for (count1, count2), char in
                  zip(input_list, ["A", "B", "C", "D", "E"])]

    result = max(input_list)

    print(result[1], result[0])

Python: while True:
    try:
        n = [[0,"A"],[0,"B"],[0,"C"],[0,"D"],[0,"E"]]
        for i in range(5):
            n[i][0] = sum(list(map(int,input().split())))
        n.sort(reverse = True)
        print(n[0][1],n[0][0])
    except:
        break

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

Python: dic = {0:"A", 1:"B", 2:"C", 3:"D", 4:"E"}
while True:
  sa = list(map(int, input().split()))
  if sa == [0, 0]:
    break
  lst = [sum(sa)]
  for _ in range(4):
    lst.append(sum(map(int, input().split())))
  print(dic[lst.index(max(lst))], max(lst))

Python: import sys

while True:
    slist = {'A': 0, 'B': 0, 'C': 0, 'D': 0, 'E': 0}
    for c in 'ABCDE':
        s1, s2 = map(int, input().split())
        if s1 == 0 and s2 == 0:
            sys.exit()
        slist[c] = s1+s2
    print(*sorted(slist.items(), key=lambda x: x[1])[-1])

Python: import sys
while True:
    sells=[]
    for i in range(5):
        s1,s2=[int(j) for j in input().split(" ")]
        if s1==0 and s2==0:
            sys.exit()
        sells.append(s1+s2)
    print(chr(ord('A')+sells.index(max(sells))),max(sells))

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 = []

C++: #include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <string>
#include <string.h>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <stdlib.h>

using namespace std;

int main (void)
{
	for (int u = 0; u < 100; u++)
	{
		int a[5],b[5];
		int p = 0;

		for (int i = 0; i < 5; i++)
		{
			cin >> a[i] >> b[i];
			if (a[i] == 0 && b[i] == 0)
			{
				p++;
				break;
			}
		}
		if (p != 0)
		{
			break;
		}

		int gg = 0,ggg = 0;
		for (int i = 0; i < 5; i++)
		{
			if (a[i] + b[i] > gg)
			{
				gg = 0;
				gg = a[i] + b[i];
				ggg = 0;
				ggg = i;
			}
		}


		if (ggg == 0)
		{
			cout << 'A';
		}
		else if (ggg == 1)
		{
			cout << 'B';
		}
		else if (ggg == 2)
		{
			cout << 'C';
		}
		else if (ggg == 3)
		{
			cout << 'D';
		}
		else if (ggg == 4)
		{
			cout << 'E';
		}
		cout << " " << gg << endl;
	}
}

C++: #include<stdio.h>
#include<algorithm>

int main(){
	
	while(1){
		int max;
		int maxnum;
		max=0;
		for(int i=0;i<5;i++){
			int a,b;
			scanf("%d%d",&a,&b);
			if(a==0 && b==0){
				goto A;
			}
			if(a+b>max){
				max=a+b;
				maxnum=i;
			}
		}
		printf("%c%d\n",'A'+maxnum,max);
	}
	A:
	return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

int main()
{
    int a,b;
   while(true){
    cin >> a >>b;
   if(a==0&&b==0){
        return 0;
   }
    int n=0;
    int mx=a+b;
    for(int i=1;i<5;i++){
        cin >>a >>b;
           if(a==0&&b==0){
                return 0;
            }
            if(mx<(a+b)){
                mx=a+b;
                n=i;
            }
    }
    cout <<(char)('A'+n)<<" " <<mx << endl;
   }
}

C++: #include <stdio.h>

int main()
{
        int shop[5];
        int m,e;
        int i=0,j=0,top_s,max=0;

        while (scanf("%d %d", &m, &e) && !(m == 0 && e == 0 && j%5 == 0)) {
                shop[i] = m+e;
                if (shop[i] > max) {
                        max = shop[i];
                        top_s = i;
                }               i++;
                j++;

                if (i > 4) {
                        printf("%c %d", top_s+'A', max);
                        i = max = 0;
                }

        }
        return 0;
}