#include <bits/stdc++.h>
using namespace std;
long long frq[28];
map<char, int> mp;
map<char, int> mp1;
bool lol = true;
int main() {
  int x;
  cin >> x;
  int a[10002];
  int b[10002];
  for (int i = 1; i <= x; i++) {
    a[i] = i;
  }
  int k = a[x];
  for (int i = 1; i < x; i++) {
    b[i + 1] = a[i];
  }
  b[1] = k;
  for (int i = 1; i <= x; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
