#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int s, n = 0, t = 0, i = 2, d = 2;
  cin >> n;
  t = n - 1;
  i = 2;
  s = 2;
  cout << "2"
       << " ";
  for (int i = 0; i < n - 2; i++) {
    s = s + d;
    d++;
    if (s > n && s % n != 0) {
      cout << s % n << " ";
    }
    if (s < n) {
      cout << s << " ";
    }
    if (s % n == 0) {
      cout << n << " ";
    }
  }
  return 0;
}
