#include #include using namespace std; int main() { int a, b; cin >> a >> b; int value = a + 5 * b; if (a == 0) { for (int i = 1; i <= value; i++) { if (i % 5 == 0)cout << i << endl; } } else if (a == 1) { for (int i = 1; i <= value; i++) { if (i % 5 == 0 || i % 5 == 1)cout << i << endl; } } else if (a == 2) { for (int i = 1; i <= value; i++) { if (i % 5 == 0 || i % 5 == 1)cout << i << endl; else if (i % 5 == 2)cout << i << endl; } } else if (a == 3) { for (int i = 1; i <= value; i++) { if (i % 5 == 0 || i % 5 == 1)cout << i << endl; else if (i % 5 == 2 || i % 5 == 3)cout << i << endl; } } else for (int i = 1; i <= value; i++) { cout << i << endl; } return 0; }