#include <iostream>
using namespace std;

int main() {
    
    int a,b,ans;
    cin >> a >> b;
    
    for(int i = 0;i <= b;i++){
        for(int j = 1;j <= a;j++){
            if(j == 5 && i < b)break;
            ans = i*5 + j;
            cout << ans << endl;
        }
        if(i<b)cout << (i+1)*5 << endl;
    }
    
return 0;
}