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

C++: #include<iostream>
using namespace std;
char A[6] = "ABCDE";
int a, b, maxn, maxid;
int main() {
	while (true) {
		maxn = 0;
		for (int i = 0; i < 5; i++) {
			cin >> a >> b;
			if (a == 0 && b == 0) { goto E; }
			if (maxn < a + b) {
				maxn = a + b;
				maxid = i;
			}
		}
		cout << A[maxid] << ' ' << maxn << endl;
	}
E:;
	return 0;
}

C++: // Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int s1, s2;
		cin >> s1 >> s2;

		if(s1==0&&s2==0)
			break;

		char n_max = 'A';
		int s_max = s1+s2;

		cin >> s1 >> s2;
		if(s1+s2>s_max){
			n_max = 'B';
			s_max = s1+s2;
		}

		cin >> s1 >> s2;
		if(s1+s2>s_max){
			n_max = 'C';
			s_max = s1+s2;
		}

		cin >> s1 >> s2;
		if(s1+s2>s_max){
			n_max = 'D';
			s_max = s1+s2;
		}

		cin >> s1 >> s2;
		if(s1+s2>s_max){
			n_max = 'E';
			s_max = s1+s2;
		}

		cout << n_max << ' ' << s_max << '\n';
	}

	return 0;
}

C++: #include <cstdio>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
	pair<int, int> a[5];
	while (true) {
		int x, y;
		for (int i=0; i<5; ++i) {
			scanf("%d%d", &x, &y);
			if (x==0 && y==0) return 0;
			a[i] = make_pair(x+y, i);
		}
		sort(a, a+5);
		printf("%c %d\n", 'A'+a[4].second, a[4].first);
	}
	return 0;
}

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

int main(){
	while(1){
		int s1,s2;
		int maxc=0;
		int max=0;
		for(int i=0;i<5;i++){
			cin >> s1 >> s2;
			if(!s1&&!s2)return 0;
			if(s1+s2>max){
				max = s1 + s2;
				maxc = 'A'+i;
			}
		}
		cout << maxc << endl;
	}
}

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

int main(){
	while(1){
		int maxnum = -1, maxidx = 0;
		int s1, s2;
		cin >> s1 >> s2;
		if(s1 == 0 && s2 == 0) break;
		maxnum = s1 + s2;
		for(int i = 1;i <= 4;i++){
			cin >> s1 >> s2;
			if(s1 + s2 > maxnum){
				maxnum = s1 + s2;
				maxidx = i;
			}
		}
		cout << "ABCDE"[maxidx] << ' ' << maxnum << endl;
	}
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,i,c,d;
	while(1){
	    c=0;
		d=0;
	    scanf("%d %d",&a1,&b1);
		    if(a1==0&&b1==0) break;
			if(c<a1+b1) c=a1+b1;
		scanf("%d %d",&a2,&b2);
		    if(c<a2+b2) c=a2+b2,d=1;
		scanf("%d %d",&a3,&b3);
		    if(c<a3+b3) c=a3+b3,d=2;
		scanf("%d %d",&a4,&b4);
		    if(c<a4+b4) c=a4+b4,d=3;
		scanf("%d %d",&a5,&b5);
		    if(c<a5+b5) c=a5+b5,d=4;
		if(d==0) printf("A %d\n",c);
		else if(d==1) printf("B %d\n",c);
		else if(d==2) printf("C %d\n",c);
		else if(d==3) printf("D %d\n",c);
		else if(d==4) printf("F %d\n",c);
	}
	return 0;
}

C++: #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>

using namespace std;

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;

const int INF = 1001001001;

int main()
{
	for(;;){
		int bestid;
		int best = -1;
		rep(i, 5){
			int a, b;
			scanf("%d%d", &a, &b);
			if(a==0 && b==0)
				goto end;
			a += b;
			if(best < a){
				bestid = i;
				best = a;
			}
		}
		printf("%c %d\n", bestid+'A', best);
	}
end:
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
long s[5],a,b,i,m,mm;
while(cin>>a>>b,a*a+b*b){
s[0]=a+b;
for(i=1;i<5;i++){
cin>>a>>b;
s[i]=a+b;
}
for(m=s[0],mm=0,i=1;i<5;i++)if(m<s[i]){m=s[i];mm=i;}
cout<<"ABCDE"[mm]<<" "<<m<<endl;
}
return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int most,a,b;
  char s,MOST;
  while(1){
    cin >> a >> b;
    if(a==0 && b==0){
      break;
    }
    s='A';
    most=a+b;
    MOST=s;
    for(int i=1;i<5;i++){
      cin >> a >> b;
      s++;
      if(a+b>most){
	most=a+b;
	MOST=s;
      }
    }
    cout << MOST << " " << most << endl;
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
  int s1, s2;
  while( cin >> s1 >> s2, s1+s2 ) {
    int maxn = s1 + s2;
    char maxi = 'A';
    for(int i=1; i<5; i++) {
      cin >> s1 >> s2;
      if( maxn < s1 + s2 ) {
	maxn = s1 + s2;
	maxi = 'A' + i;
      }
    }

    cout << maxi << ' ' << maxn << endl;
  }
}

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

using namespace std;

struct DATA{
  char name;
  int number;
};

bool compare(const DATA&, const DATA&);

int main(){
  int i, s1, s2;
  char c[5] = {'A', 'B', 'C', 'D', 'E'};
  DATA data[5];

  while(1){
    for(i=0; i<5; ++i){
      cin >> s1 >> s2;
      if(s1 == 0 && s2 == 0) break;
      data[i].name = c[i];
      data[i].number = s1 + s2;
    }

    if(s1 == 0 && s2 == 0) break;
    sort(data, data+5, compare);
    cout << data[0].name << " " << data[0].number << endl;
  }

  return 0;
}

bool compare(const DATA& x, const DATA& y){
  return x.number > y.number;
}

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

int main(){
	int shop[5];
	char ans;int answer;
	int s1,s2;
	
	while(cin>>s1>>s2){
	
		if(s1==0&&s2==0)break;
		shop[0]=s1+s2;
		
	for(int i=1;i<5;i++){
		cin>>s1>>s2;
		shop[i]=s1+s2;
	}
	answer=0;
	for(int i=0;i<5;i++){
	answer=max(shop[i],answer);
	}
	if(answer==shop[0])ans='A';
	if(answer==shop[1])ans='B';
	if(answer==shop[2])ans='C';
	if(answer==shop[3])ans='D';
	if(answer==shop[4])ans='E';
	
	cout<<ans<<" "<<answer<<endl;
}
	return 0;
	
}

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

int main() {
  for(;;) {    
    pair<int,int> v[5];
    
    for(int i = 0; i < 5; i++) {
      int a, b;
      cin >> a >> b;
      if( a == 0 && b == 0 ) goto END;
      v[i] = make_pair(a + b, i);
    }
    sort( v, v + 5 );
    cout << (char)('A' + v[4].second) << " " << v[4].first << endl;
  }

 END:
  return 0;

}

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

int main()
{
  int n, m;
  
  while (cin >> n >> m, n || m){
    int maxn = n + m;
    char s = 'A', store;
    for (int i = 1; i < 5; i++){
      cin >> n >> m;
      int sum = n + m;
      if (maxn < sum){
        maxn = sum;
        store = s + i;
      }
    }
    cout << store << ' ' << maxn << endl;
  }
 
  return (0);
}