import java.util.Scanner;
public class Test15 {
public static void main(String[] args) {
// TODO Auto-generated method stub
for (int i = 0; i < 1000; i++) {
if (i % 3 == 0) {
System.out.print(i+"\t");
if(i%10==0){
System.out.println();
}
}
}
}
}