#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, i;
  int a[100];
  while (cin >> x && x) {
    if (x == 1) {
      cout << x << endl;
    } else {
      cout << x << " ";
      for (i = 1; i < x; i++) cout << i << " ";
      cout << endl;
    }
  }
  return 0;
}
