what is the problem in my code .Please run and find out and tell me.

#include
using namespace std;

int main() {
long long int T,A,B,max=0,s;
cin>>T;
for(int i=0;i<T;i++)
{
for(int j=0;j<3;j++)
{
cin>>A>>B;
sum=A+B;
if(sum>max)
max=sum;
}
cout<<max<<endl;

}
return 0;

}