

package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
"strings"
)
func isExist(list []int, num int) bool {
find := false
for _, i := range list {
if i == num {
find = true
break
}
}
return find
}
func getAllRouters(all *[][]int, currents []int, n int) {
if len(currents) == n {
*all = append(*all, currents)
} else {
for i := 1; i <= n; i++ {
if !isExist(currents, i) {
currents = append(currents, i)
getAllRouters(all, currents, n)
currents = currents[:len(currents)-1]
}
}
}
}
func main() {
var n int
fmt.Scan(&n)
distanceData := make([][]i