#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n;
  cin >> n;
  int cnt = 0;
  int jump = 1;
  int arr[n];
  for (int k = 1; k <= n; k++) {
    arr[k] = k;
  }
  for (i = 1; i <= n * n; i++) {
    jump += i;
    if (jump <= n) {
      cout << arr[jump] << " ";
    } else {
      cout << arr[jump % n] << " ";
    }
    cnt++;
    if (cnt == n - 1) {
      break;
    }
  }
}
