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)
	}
}

C++: #include<iostream>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)

int main(){
	int s1,s2,ms,mi=0;
	while( cin >> s1 >> s2, s1||s2 ){
		ms = s1+s2;
		rep(i,4){
			cin >> s1 >> s2;
			if( ms < s1+s2 ){
				ms = s1 + s2;
				mi = i;
			}
		}
		cout << (char)('A'+mi) << " " << ms << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
  int t,a,d,c;
  while(cin>>a>>d,(a|d)) {
    t=a+d;c=0;
    for(int i=1;i<5;i++) {
      cin>>a>>d;
      if(t<a+d)t=a+d,c=i;
    }
    cout<<(char)(c+'A')<<' '<<t<<endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <cctype>
#include <utility>
using namespace std;

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _T template <typename T>
#define _HT template <typename H, typename... T>
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_T T in(int c){T n=0;bool m=false;while(isspace(c)){c=gcu();}if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
_in() {return in<int>(gcu());}
_T T scan(T &n){int c=gcu();return c==EOF?false:(n=in<T>(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
#ifdef _GLIBCXX_STRING
_sc(string &s){int c;s="";
	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#endif
_HT _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
_vo(bool b) {pcu('0'+b);}
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
#ifdef _GLIBCXX_STRING
_vo(string s){for(char c:s)pcu(c);}
#endif
_T _vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vl(){out('\n');}
#ifdef _GLIBCXX_VECTOR
_T _vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);outl();}
#endif
_HT _vo(H&& h, T&&... t){out(h);out(move(t)...);}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

int main() {
	for (;;) {
		int n = 0, s = 0;;
		for (char i = 0; i < 5; i++) {
			int a = in() + in();
			if (!a)
				return 0;
			if (s < a) {
				n = i;
				s = a;
			}
		}
		outl((char)('A' + n), ' ', s);
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    int a, b;
    vector<int> vec(5);

    int i = 0;
     int maxv = 0, maxi = 0;
    while (true) {
        cin >> a >> b;
        if (a == 0 && b == 0)
            break;
        if (maxv < a+b) {
            maxv = a + b;
            maxi = i;
        }
        
        if (i >= 4) {
            printf("%c %d\n", 'A'+maxi, maxv);
            maxv = 0;
            maxi = 0;
            i = 0;
        }
        else {
            i++;
        }
    }
}

C++: #include <bits/stdc++.h>
using namespace std;


int main(){
    for(int j=0; j<105; j++){
        int s1, s2;
        cin >> s1 >> s2;
        if(s1 == 0 && s2 == 0){
            break;
        }
        int ans = s1+s2;
        char mozi;
        mozi = 65;
        for(int i=1; i<5; i++){
            int a, b;
            cin >> a >> b;
        int temp;
        temp = a+b;
        if(ans <= temp){
            ans = temp;
            mozi = 65+i;
        }
        }
        cout << mozi << " " << ans << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

int main(void){
	while(1){
		int a,b,c;
		map<int, string, greater<int> > p;
		cin >> b >> c;
		if(b==0 && c==0)break;
		if(a==0)p.insert( pair<int, string>( b+c ,"A") );
		for(a=1;a<5;a++){
			cin >> b >> c;
			if(a==1)p.insert( pair<int, string>( b+c ,"B") );
			if(a==2)p.insert( pair<int, string>( b+c ,"C") );
			if(a==3)p.insert( pair<int, string>( b+c ,"D") );
			if(a==4)p.insert( pair<int, string>( b+c ,"E") );
		}
		map<int, string, greater<int> >::iterator it = p.begin();
		cout << (*it).second << " " << (*it).first << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int a[5],b[5];
	int i,max,sum[5];
	char c2,c[5]={'A','B','C','D','E'};
	while (scanf("%d %d",&a[0],&b[0])!=EOF){
	    if(a[0]==0&&b[0]==0) break;
		sum[0]=a[0]+b[0];
		max=sum[0];
		c2='A';
		for(i=1;i<5;i++){
		    scanf("%d %d",&a[i],&b[i]);
			sum[i]=a[i]+b[i];
		}
		for(i=0;i<5;i++){
            if(max<sum[i]){
			    max=sum[i];
				c2=c[i];
			}
		}
		printf("%c %d\n",c2,max);
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,a,s,i,x[1000],max,flg,c;
	while(1){
		c=0;
			for(i=0;i<5;i++){
				flg=0;
				scanf("%d %d",&a,&s);
					if(a==0&&s==0){
						i=6;
						flg=1;
					}	
					x[i]=a+s;
			}
		if(flg==1) break;
		max=-1;
			for(i=0;i<5;i++){
				if(max<x[i]){
					max=x[i];
					c++;
				}
			}
		if(c==1){
			printf("A %d\n",max);
		}
		else if(c==2){
			printf("B %d\n",max);
		}
		else if(c==3){
			printf("C %d\n",max);
		}
		else if(c==4){
			printf("D %d\n",max);
		}
		else if(c==5){
			printf("E %d\n",max);
		}		
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int a,b,d,i,j;
	char c[6]="ABCDE";
	scanf("%d %d",&a,&b);
	while(a!=0 || b!=0){
		j=0; d=a+b;
		for(i=1;i<5;i++){
			scanf("%d %d",&a,&b);
			if(a+b>d){
				d=a+b; j=i;
			}
		}
		printf("%c %d\n",c[j],d);
		scanf("% %d",&a,&b);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){int p[5],tmp,ans;char n[5]={'A','B','C','D','E'};while(1){ans=0;for(int i=0;i<5;i++){cin>>p[i]>>tmp;p[i]+=tmp;if(!p[0])return 0;if(p[ans]<p[i])ans=i;}cout<<n[ans]<<' '<<p[ans]<<endl;}}

C++: #include<iostream>
using namespace std;
main(){
 int x, y;
 while( cin >> x >> y && x && y ){
int m = x+y;
char ch = 'A';
for ( int i = 1; i < 5; i++ ){
 cin >> x >> y;
 if ( x+y > m ){
m = x+y;
ch = (char)('A' + i);
 }
}
cout << ch << " " << m << endl;
 }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main(){
    while(1){
        int v[5];
        char name='A';
        int n=0;
        for(int i=0;i<5;i++){
            v[i]=0;
            for(int j=0;j<2;j++){
                int t;cin>>t;
                v[i]+=t;
            }
            if(v[i]==0) return 0;
            if(v[i]>n){
                n=v[i];
                name=i+'A';
            }
        }
        cout<<name<<" "<<n<<endl;
    }
}

C++: #include <iostream>
using namespace std;

int main()
{
	char n[5] = {'A','B','C','D','E'};
	int a[5],b[5];
	int name,max;
	while(cin >> a[0] >> b[0]){
		if(a[0] == 0 && b[0] == 0)
			break;
		max = a[0]+b[0];
		name = 0;
		for(int i=1;i<5;i++){
			cin >> a[i] >> b[i];
			if(max < a[i]+b[i]){
				max = a[i]+b[i];
				name = i;
			}
		}
		cout << n[name] << " " << max << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

main(){
    int x, y;
    while( cin >> x >> y && x && y ){
	int m = x+y;
	char ch = 'A';
	for ( int i = 1; i < 5; i++ ){
	    cin >> x >> y;
	    if ( x+y > m ){
		m = x+y;
		ch = (char)('A' + i);
	    }
	}
	cout << ch << " " << m << endl;
    }
}