n = gets.to_i ans = (1..n).to_a if n%2 == 0 ans[n-2], ans[n-1] = ans[n-1], ans[n-2] end puts ans.join(" ")