#include int main() { int A, B; int i; scanf("%d", &A); scanf("%d", &B); for (i = A; i <= B; i++) { if (i % 3 == 0) printf("%d\n", i); } return 0; }