#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, nn, i = 4, c = 3, d;
  cin >> n;
  nn = n - 2;
  cout << "2";
  while (nn--) {
    d = i % n;
    if (d == 0)
      cout << " " << n;
    else
      cout << " " << d;
    i = d + c;
    c++;
  }
  cout << endl;
  return 0;
}
