#include <bits/stdc++.h>
using namespace std;
vector<long long int> arr(1001);
long long int n;
void first(long long int x) {
  if (x == 1) return;
  first(x - 1);
  swap(arr[x], arr[x - 1]);
}
void solve() {
  cin >> n;
  long long int j = 1;
  for (long long int i = 2; i <= n; i++, j++) {
    arr[i] = j;
  }
  arr[1] = n;
  for (long long int i = 1; i <= n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
