#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long lli;

lli n;

int main() {
  while(cin >> n && n) {
    vector<lli> v;
    for(lli x = 1; x < n; ++x) {
      v.push_back(x*x%n);
    }
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    vector<lli> ans(n, 0LL);
    for(int i = 0; i < v.size(); ++i) {
      for(int j = 0; j < v.size(); ++j) {
        if(i == j) continue;
        lli x = v[i] - v[j];
        if(x < 0) x += n;
        if(x > (n-1)/2) x = n - x;
        ++ans[x];
      }
    }
    for(int i = 1; i <= (n-1)/2; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}