#include<iostream>
using namespace std;
int main()
{
const int min=1;
const int max=6;
for(int i=min;i<=max;++i)
for(int j=min;j<=max;++j)
for(int k=min;k<=max;++k)
for(int l=min;l<=max;++l)
for(int m=min;m<=max;++m)
for(int n=min;n<=max;++n){
if(i==j||i==k||i==l||i==m||i==n||j==k||j==l||j==m||j==n
||k==l||k==m||k==n||l==m||l==n||m==n)
continue;
if(i+j+k==k+l+m && k+l+m==i+m+n){
cout<<"
"<<i<<endl
<<"
"<<j<<"
"<<n<<endl
<<"
"<<k<<"
"<<l<<"
"<<m<<endl;
cout<<"***********************"<<endl;
}
}
system("pause");
return 0;
}