#include<stdio.h>
#include<time.h>
#include<stdlib.h>
int main()
{
int a=0,b=0,c=0;
int num1=0,num2=0,num3=0;
int Num[3];
int temp,i=0;
srand(time(NULL));
while(1)
{
a=rand()%9+1;
b=rand()%9+1;
c=rand()%9+1;
if(a!=num1&&a!=num2&&a!=num3&&b!=num1&&b!=num2&&b!=num3&&c!=num1&&c!=num2&&c!=num3)
{
if(a!=b&&b!=c&&c!=a)
{
num1=a;
num2=b;
num3=c;
Num[i]=num1*100+num2*10+num3;
i++;
if(i=3)
{
for(int j=0;j<2;j++)
{
if(Num[j]>Num[j+1])
{
temp=Num[j+1];
Num[j]=Num[j+1];
Num[j+1]=temp;
}
}
}
if(Num[0]*2==Num[1]&&Num[0]*3==Num[2])
{
printf("%d %d %d\n",Num[0],Num[1],Num[2]);
i=0;
num1=0;
num2=0;
num3=0;
}
}
}
}
return 0;
}