#include <iostream>
#include <set>
#include <cstring>
using namespace std;

int main(void){
	int n;

	while(cin>>n && n){
		set<int> first;
		for(int i=1;i<n;i++){
			first.insert(i*i%n);
		}

		int max = (n-1) / 2;
		int count[max+1];
		memset(count,0,sizeof(count));
		for(set<int>::iterator i = first.begin(); i != first.end(); i++){
			for(set<int>::iterator j = i; j != first.end(); j++){
				if(*i == *j) continue;

				int diff = *i - *j;
				if(diff <= 0) diff += n;
				if(diff > max) diff = n - diff;
				count[diff]++;
			}
		}

		for(int i=1;i<=max;i++){
			cout<<count[i]<<endl;
		}
	}

	return 0;
}