You are given one integer $$$n$$$ ($$$n > 1$$$).Recall that a permutation of length $$$n$$$ is an array consisting of $$$n$$$ distinct integers from $$$1$$$ to $$$n$$$ in arbitrary order. For example, $$$[2, 3, 1, 5, 4]$$$ is a permutation of length $$$5$$$, but $$$[1, 2, 2]$$$ is not a permutation ($$$2$$$ appears twice in the array) and $$$[1, 3, 4]$$$ is also not a permutation ($$$n = 3$$$ but there is $$$4$$$ in the array).Your task is to find a permutation $$$p$$$ of length $$$n$$$ that there is no index $$$i$$$ ($$$1 \le i \le n$$$) such that $$$p_i = i$$$ (so, for all $$$i$$$ from $$$1$$$ to $$$n$$$ the condition $$$p_i \ne i$$$ should be satisfied).You have to answer $$$t$$$ independent test cases.If there are several answers, you can print any. It can be proven that the answer exists for each $$$n > 1$$$.

The first line of the input contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. Then $$$t$$$ test cases follow. The only line of the test case contains one integer $$$n$$$ ($$$2 \le n \le 100$$$) — the length of the permutation you have to find.

For each test case, print $$$n$$$ distinct integers $$$p_1, p_2, \ldots, p_n$$$ — a permutation that there is no index $$$i$$$ ($$$1 \le i \le n$$$) such that $$$p_i = i$$$ (so, for all $$$i$$$ from $$$1$$$ to $$$n$$$ the condition $$$p_i \ne i$$$ should be satisfied). If there are several answers, you can print any. It can be proven that the answer exists for each $$$n > 1$$$.

package main

import (
	"fmt"
	"bufio"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Scan()
	var it, i int64
	t, _ := strconv.ParseInt(sc.Text(), 10, 64)
	for it=1; it<=t; it++ {
		sc.Scan()
		n, _ := strconv.ParseInt(sc.Text(), 10,64)
		fmt.Printf("%d ", n);
		for i=2; i<=n; i++ {
			fmt.Printf("%d ", i-1)
		}
		fmt.Printf("\n")
	}
}

package main

import (
	"fmt"
	"bufio"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func solve() {
	var n int
	scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		printf("%d ", (i + 1) % n + 1)
	}
	printf("\n");
}

func main() {
	defer writer.Flush()
	var t int
	scanf("%d\n", &t)
	for ; t > 0; t-- {
		solve()
	}
}

package main
import (
    "fmt"
    "os"
    "bufio"

)
var in = bufio.NewReader(os.Stdin)
func main() {
    testCases := 0
    fmt.Fscan(in,&testCases)
    for i := 0; i < testCases; i++ {
        n := 0
        fmt.Fscan(in,&n)
        for i:= 2; i <= n;i++ {
            fmt.Print(i," ");
        }
        fmt.Println(1)
    }
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"math/rand"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	solve := func(Case int) {
		var n int
		Fscan(in, &n)
		a := make([]int, n)
		for i := range a {
			a[i] = i
		}
	o:
		for {
			rand.Shuffle(n, func(i, j int) { a[i], a[j] = a[j], a[i] })
			for i, v := range a {
				if v == i {
					continue o
				}
			}
			break
		}
		for _, v := range a {
			Fprint(out, v+1, " ")
		}
		Fprintln(out)
	}

	var t int
	Fscan(in, &t)
	for Case := 1; Case <= t; Case++ {
		solve(Case)
	}
}

func main() { run(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	solve := func(Case int) {
		var n int
		Fscan(in, &n)
		Fprint(out, n)
		for i := 1; i < n; i++ {
			Fprint(out, " ",i)
		}
		Fprintln(out, )
	}

	var t int
	Fscan(in, &t)
	for Case := 1; Case <= t; Case++ {
		solve(Case)
	}
}

func main() { run(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner *bufio.Scanner
var writer *bufio.Writer

func getInt64() int64 {
	scanner.Scan()
	x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return x
}

func getInt() int {
	scanner.Scan()
	x, _ := strconv.Atoi(scanner.Text())
	return x
}

func getFloat() float64 {
	scanner.Scan()
	x, _ := strconv.ParseFloat(scanner.Text(), 64)
	return x
}

func getString() string {
	scanner.Scan()
	return scanner.Text()
}

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	for i := getInt(); i > 0; i-- {
		sol()
	}
}

func sol() {
	var arr []int
	n := getInt()
	for i := 0; i < n; i++ {
		arr = append(arr, n-i)
	}
	if n%2 == 1 {
		arr[(n / 2)] = 1
		arr[n-1] = (n / 2) + 1
	}
	ans := fmt.Sprintf("%v", arr)
	ans = ans[1 : len(ans)-1]
	writer.WriteString(ans + "\n")
}

package main
import (
	"bufio"
	"fmt"
	"os"
)
var rd = bufio.NewReader(os.Stdin)
func main() {
	q := 0
	fmt.Fscan(rd, &q)
	for t := 0; t < q; t++ {
		n := 0
		fmt.Fscan(rd, &n)
		for i := 2; i <= n; i++ {
			fmt.Print(i, " ")
		}
		fmt.Println(1)
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	in := bufio.NewReader(os.Stdin)

	var t, n int
	fmt.Fscan(in, &t)

	for ; t > 0; t-- {
		fmt.Fscan(in, &n)
		result := ""
		for i := 2; i <= n; i++ {
			result += strconv.Itoa(i) + " "
		}
		result += "1"
		fmt.Println(result)
	}
}

package main

import(

	"fmt"
	."fmt"
	"bufio"
	"os"
)

func solve(n int){
	for i:=0;i<n;i++{
		if i<n-1{
			fmt.Printf("%v ",i+2)
		}else{
			fmt.Printf("1")
		}
	}
	fmt.Println()
}

func main(){
	var TESTS int
	in := bufio.NewReader(os.Stdin)

	Fscan(in,&TESTS)

	for ;TESTS>0;TESTS--{
		var n int
		Fscan(in,&n)
		solve(n)
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {

	// get T
	var T int
	fmt.Scanf("%d\n", &T)

	// range over problems
	for t := 0; t < T; t++ {

		// get N
		var N int
		fmt.Scanf("%d\n", &N)

		// solve
		s := solve(N)
		fmt.Println(strings.Join(s, " "))
	}
}

func solve(N int) []string {

	// generate an array
	arr := make([]string, N)
	arr[0] = fmt.Sprint(N)
	for n := 1; n < N; n++ {
		arr[n] = fmt.Sprint(n)
	}

	return arr
}

package main
import (
    "fmt"
    "os"
    "bufio"

)
var in = bufio.NewReader(os.Stdin)
func main() {
    testCases := 0
    fmt.Fscan(in,&testCases)
    for i := 0; i < testCases; i++ {
        n := 0
        fmt.Fscan(in,&n)
        for i:= 2; i < n;i++ {
            fmt.Print(i," ");
        }
        fmt.Println(1)
    }
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner *bufio.Scanner
var writer *bufio.Writer

func getInt64() int64 {
	scanner.Scan()
	x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return x
}

func getInt() int {
	scanner.Scan()
	x, _ := strconv.Atoi(scanner.Text())
	return x
}

func getFloat() float64 {
	scanner.Scan()
	x, _ := strconv.ParseFloat(scanner.Text(), 64)
	return x
}

func getString() string {
	scanner.Scan()
	return scanner.Text()
}

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	sol()
}

func sol() {
	var arr []int
	n := getInt()
	for i := 0; i < n; i++ {
		arr = append(arr, n-i)
	}
	if n%2 == 1 {
		arr[(n / 2)] = 1
		arr[n-1] = (n / 2) + 1
	}
	ans := fmt.Sprintf("%v\n", arr)
	ans = ans[1 : len(ans)-2]
	writer.WriteString(ans)
}