import java.util.HashMap;
public class Main1 {
public static void main(String[] args) {
int x,y,z;
HashMap<Integer,Integer> map = new HashMap<Integer, Integer>();
for (int i = 100; i <=333; i++) {
x=i;
y=2*i;
z=3*i;
map.clear();
map.put(x%10,1);
map.put((x/10)%10,1);
map.put((x/100)%10,1);
map.put(y%10,1);
map.put((y/10)%10,1);
map.put((y/100)%10,1);
map.put(z%10,1);
map.put((z/10)%10,1);
map.put((z/100)%10,1);
if (map.size()==9) {
System.out.println(x+" "+y+" "+z);
}
}
}
}