#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; ++i)


void solve(int n) {
  vector<int> v;
  for(int s = 1; s <= n-1; s++) {
    v.push_back(s*s%n);
  }
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());

  int cnt[10001];
  fill(cnt, cnt+(n-1)/2+1, 0);
  rep(b, v.size()) {
    rep(a, v.size()) {
      if(a == b) continue;
      int k = v[b] - v[a];
      if(k < 0) k += n;
      if(k > (n-1)/2) k = n - k;
      cnt[k]++;
    }
  }
  for(int i = 1; i <= (n-1)/2; i++) cout << cnt[i] << endl;
}

int main() {
  int n;
  while((cin >> n) && n) solve(n);
}