/*
 * 0142.cpp
 *
 *  Created on: 2011/07/27
 *      Author: isa
 */

#include <iostream>
#include <set>
#include <map>
#include <cstring>
#include <vector>
#include <algorithm>

using namespace std;

int main(void){
	int n;

	while(cin >> n && n){
		vector<int> v;
		int times[((n-1)/2)+1];

		memset(times,0,sizeof(times));
		for(int i=1;i<n;i++){
			if(find(v.begin(),v.end(),i*i%n) == v.end()){
				v.push_back(i*i%n);
			}
		}

		for(int i=0;i<v.size();i++){
			for(int j=0;j<v.size();j++){
				int tmp;
				if(i == j) continue;
				tmp = v[i] - v[j];
				if(tmp < 0) tmp+=n;
				if(tmp > (n-1)/2) tmp = n - tmp;
				times[tmp]++;
			}
		}
		for(int i=1;i<=(n-1)/2;i++){
			cout << times[i] << endl;
		}

	}
}