#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
void solve() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n - 1; i++) {
    cout << i + 1 << " ";
  }
  cout << 1 << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
