#include
int main() {
int x1 = 100,x2 = 0,x3 = 0,a[15] = {0},s[15] = {0};
while(x1 <= 333) {
x2 = x1 + 333;
x3 = x2 + 333;
for(int i = 0; i < 3; i++) {
a[i] = x1 % 10;
x1 /= 10;
}
for(int i = 3; i < 6; i++) {
a[i] = x2 % 10;
x2 /= 10;
}
for(int i = 6; i < 9; i++) {
a[i] = x3 % 10;
x3 /= 10;
}
for(int i = 0; i < 9; i++) {
s[a[i]]++;
}
for(int j = 0; j < 9; j++) {
if(s[j] == 1) {
if(j == 8) {
printf("the three numbers are %d %d %d\n",x1,x2,x3);
break;
}
}
else {
break;
}
}
x1++;
}
return 0;
}