#include <bits/stdc++.h>
using namespace std;
double Fib(double x, double z);
string BinDec(unsigned long long x);
string StringInt(long long x);
unsigned long long StringInt(string x);
unsigned long long BinDec(string x);
unsigned long long POWMOD(unsigned long long x, unsigned long long y,
                          unsigned long long mod);
unsigned long long POWE(long long, long long);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<long long> v;
  bool p[1300000] = {};
  long long i, j;
  for (i = 2; i < 1299828; i++) {
    if (p[i] == 0) {
      for (j = i * i; j < 1299828; j += i) {
        p[j] = 1;
      }
    }
  }
  int x;
  cin >> x;
  if (x == 1)
    cout << 1;
  else {
    cout << x << ' ';
    for (i = 1; i <= x - 1; i++) {
      cout << i << ' ';
    }
  }
  return 0;
}
