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

#include <iostream>
#include <set>
#include <map>

using namespace std;

int main(void){
	int n;

	while(cin >> n && n){
		set<int> s;
		map<int,int> m;
		for(int i=1;i<n;i++){
			s.insert((i*i)%n);
			//cout << i*i%n << endl;
		}

		set<int>::iterator it,jt;

		for(it = s.begin(); it != s.end(); ++it){
			for(jt = s.begin(); jt != s.end(); ++jt){
				int tmp;
				if(it == jt) continue;
				tmp = *it - *jt;
				if(tmp < 0) tmp+=n;
				if(tmp > (n-1)/2) tmp = n - tmp;
				m[tmp]++;
			}
		}
		for(int i=1;i<=(n-1)/2;i++){
			cout << m[i] << endl;
		}

	}
}