#include <bits/stdc++.h>

using namespace std;

int main() {
  
  int N;
  
  while(cin >> N && N) {
    int score[(N-1)/2+5];
    fill(score, score+(N-1)/2+3, 0);
    set<int> st;
    for(int i=1; i<N; i++) {
      st.insert(i*i % N);
    }
    
    vector<int> vec;
    for(set<int>::iterator it = st.begin(); it!=st.end(); it++) {
      vec.push_back(*it);
    }
    
    int const M = st.size();
    
    for(int i=0; i<M; i++) {
      for(int j=0; j<M; j++) {
	if(vec[i] == vec[j]) continue;
	
	int diff = vec[i]-vec[j];
	if(diff < 0) diff += N;
	if((N-1)/2 < diff) {
	  diff = N - diff;
	}
	score[diff] ++;
      }
    }
    
    for(int i=1; i<=(N-1)/2; i++) {
      cout << score[i] << endl;
    }
  }
  
  return 0;
}