#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    vec.push_back(i);
  }
  int idx = 0;
  for (int i = 1; i <= n - 1; i++) {
    for (int j = 0; j < i; j++) {
      idx++;
      if (idx == vec.size()) idx = 0;
    }
    cout << vec[idx];
    if (i == n - 1)
      cout << endl;
    else
      cout << ' ';
  }
  return 0;
}
