#include<iostream.h>
#include<conio.h>
void main()
{
const int N=10;
char ch;
int i,j,n,A[N][N],flag,f,k,RealWinner;
cout<<"enter n:";
cin>>n;
for(i=1;i<n;i++)
{
for(j=0;j<i;j++)
{
ch=getch();
if(ch=='0')
{
cout<<"0";
A[i][j]=0;
A[j][i]=1;
}
else if(ch=='1')
{
cout<<"1";
A[i][j]=1;
A[j][i]=0;
}
}
cout<<endl;
}
for(i=0;i<n;i++)
A[i][i]=1;
for(i=0;i<n;i++)
{
flag=1;
for(j=0;j<n;j++)
{
f=0;
for(k=0;k<n;k++)
if((A[i][k]==1)&&(A[k][j]==1))
f=1;
if(f==0)
flag=0;
}
if(flag==1)
RealWinner=i;
}
cout<<"The RealWinner team is the team#"<<RealWinner;
getch();
}