#include <iostream.h>
int c[5];
void comb(int start,int combinN,int r)
{
int i;
if(combinN==0) {
for(i = 0; i < 3; i++)
cout<<c[i]<<" ";
cout<<endl;
}
else
{
for(i=start; i+combinN <= 5 ;i++)
{
c[r] = i+1;
comb(start+1,combinN-1,r+1);
}
}
}
void main()
{
comb(0,3,0);
}