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<cstdio>
#include<iostream>
using namespace std;
struct Date{
    int mx;
    int num;
};
int main(){
    while(1){
        int a[10]={0},b[10]={0};
        Date date;
        date.mx = 0;
        for(int i = 0; i < 5; i++){
            scanf("%d %d",&a[i],&b[i]);
            if(a[i] == 0 && b[i] == 0)goto end;
            if(date.mx < a[i]+b[i]){
                date.mx=a[i]+b[i];
                date.num = i;
            }
        }
        char d;
        switch(date.num){
            case 0:
                d = 'A';
                break;
            case 1:
                d = 'B';
                break;
            case 2:
                d = 'C';
                break;
            case 3:
                d = 'D';
                break;
            case 4:
                d = 'E';
                break;
        }
        printf("%c %d\n",d,date.mx);
    }
    end:
    return 0;
}

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

int main() {
  int a, b;
  int s[5];
  while(1) {
    for(int i=0; i<5; i++) {
      cin >> a >> b;
      if(a+b == 0) return 0;
      
      s[i] = a+b;
    }
    int num;
    int temp=-987654321;
    for(int i=0; i<5; i++) {
      temp = max(temp, s[i]);
      if(s[i] == temp) num = i;
    }
    cout << (char)('A'+num) << " " << temp << endl;
  }
  
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **argv)
{
	int a, b, tmp, tmp2;
	char w;
	while(1){
		cin >> a >> b;
		
		if(a == 0 && b == 0){
			break;
		}
		
		w = 'A';
		tmp = a + b;
		tmp2 = 0;
		for(int i = 1; i <= 4; i++){
			cin >> a >> b;
			if(tmp < (a+b)){
				tmp = a + b;
				tmp2 = i;
			}
		}
		
		cout << (char)(w+tmp2) << " " << tmp << endl;
	}
	
	return 0;
}

C++: /* 
 * File:   main.cpp
 * Author: freebsd
 *
 * Created on 2014/08/28, 10:07
 */

#include <cstdio>
#include <algorithm>

using namespace std;

int main() {
    while (true) {
        int s1[5] = {0}, s2[5] = {0};
        
        char store[5] = {'A', 'B', 'C', 'D', 'E'};
        
        char result = 0;
        
        for(int i = 0; i < 5; i++) {
            scanf("%d %d", &s1[i], &s2[i]);
        }
        
        for(int i = 0; i < 5; i++) {
            s1[i] += s2[i];
        }
        
        int i = 0;
        int max;
            
        max = s1[i];
        
        while(true) {           
            if(s1[i] < s1[i + 1]) max = s1[i + 1];
            if((i + 1) == 4) break;
        }
        
        result = store[i];
        
        printf("%c %d", result, max);
    }
}

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

int a[5];
int main() {
	while (1) {
		rep(i, 5) {
			int s1, s2; cin >> s1 >> s2;
			if (s1 == 0)return 0;
			a[i] = s1 + s2;
		}
		int*ans = max_element(a, a + 5);
		cout << (char)(ans - a + 'A') << ' ' << *ans << endl;
	}
}

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

int main()
{
    int a[5], b[5];
    char c[5] = {'A','B','C','D','E'};


    while( cin >> a[0] >> b[0] )
    {
        if( a[0] + b[0] == 0 )
            break;
        int max = a[0] + b[0], j = 0;
        for( int i = 1; i < 5; i++ )
        {
            cin >> a[i] >> b[i];
            if( max < a[i] + b[i] )
            {
                max = a[i] + b[i];
                j = i;
            }
        }
        cout << c[j] << " " << max << endl;
    }

    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int x,y,i,max,j;
	int s1[6],s2[6];
	char omise[5]={'A','B','C','D','E'};
	max=-1;
	j=0;
	for(i=0;i<5;i++){
		scanf("%d %d",&s1[i],&s2[i]);
	}
	while(!(s1[0]==0 && s2[0]==0)){
		for(i=0;i<5;i++){
			x=s1[i]+s2[i];
			if(max<x){
				max=x;
				if(i>0){
					j++;
				}
			}
		}
		printf("%c %d\n",omise[j],max);
		for(i=0;i<5;i++){
			s1[i]=0;
			s2[i]=0;
		}
		for(i=0;i<5;i++){
			scanf("%d %d",&s1[i],&s2[i]);
		}
		j=0;
	}
	return 0;
}

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

struct Shop
{
  int sale;
  char name;

  bool operator<(const Shop& right) const
  {
    return sale < right.sale;
  }
};

int main(void)
{
  while (true)
  {
    vector<Shop> shops;
    for (int i = 0, x, y; i < 5; ++i)
    {
      cin >> x >> y;
      shops.push_back( {x + y, (char)(65 + i)} );
    }
    if (cin.eof()) break;

    sort(shops.rbegin(), shops.rend() );
    cout << shops[0].name << " " << shops[0].sale << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{

	while(true){

		int s1,s2;
		int max = 0,x = 0;

		cin >> s1 >> s2;

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

		max = s1 + s2;
	
		for(int i=1 ;i<5 ;i++){

			cin >> s1 >> s2;

			if(max < (s1+s2)){
				max = s1 + s2;
				x = i;
			}
		}


		if(x==0)
			cout << 'A' << ' ' << max;
		if(x==1)
			cout << 'B' << ' ' << max;
		if(x==2)
			cout << 'C' << ' ' << max;
		if(x==3)
			cout << 'D' << ' ' << max;
		if(x==4)
			cout << 'E' << ' ' << max;
		}
		return 0;
}

C++: #include<stdio.h>

int main(){
	int mise[5],i,j,s1,s2;
	while(~scanf("%d%d",&s1,&s2)){
		if(s1==0 && s2==0)break;
		mise[0]=s1+s2;
		j=0;
		for(i=0;i<4;i++){
			scanf("%d%d",&s1,&s2);
			if(s1+s2>mise[i]){
				mise[i+1]=s1+s2;
				j=i+1;
				continue;
			}
			mise[i+1]=mise[i];
		}
		printf("%c %d\n",'A'+j,mise[j]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int s1[5], s2[5]; //午前と午後の販売個数
    
    while(true){
        for(int i = 0; i < 5; i++){
            cin >> s1[i] >> s2[i];
            if(s1[0] == 0 && s2[0] == 0) return 0;
        }

        int sum[5]; //１日の販売個数
        int max = 0; //１日の販売個数の最大値
        char n[5] = {'A', 'B', 'C', 'D', 'E'}; //店名
        int p; //１日の販売個数が最大のお店

        for(int i = 0; i < 5; i++){
            sum[i] = s1[i] + s2[i];
            if(sum[i] > max){
                max = sum[i];
                p = i;
            }
        }
        cout << n[p] << " " << max << endl;
    }
        /*if(max_name == 1) cout << "A" << " " << max << endl;
        if(max_name == 2) cout << "B" << " " << max << endl;
        if(max_name == 3) cout << "C" << " " << max << endl;
        if(max_name == 4) cout << "D" << " " << max << endl;
        if(max_name == 5) cout << "E" << " " << max << endl;*/
}

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

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

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

int main() 
{
	while (1) 
	{
		int a, b;
		cin >> a >> b;
		if (a == 0 && b == 0)break;
		map<int, string>s;
		s.insert(pair<int, string>(a + b, "A"));
		cin >> a >> b;
		s.insert(pair<int, string>(a + b, "B"));
		cin >> a >> b;
		s.insert(pair<int, string>(a + b, "C"));
		cin >> a >> b;
		s.insert(pair<int, string>(a + b, "D"));
		cin >> a >> b;
		s.insert(pair<int, string>(a + b, "E"));
		auto p = s.end();
		p--;
		cout << p->second << " " << p->first << endl;
	}
}