Identifier
Identifier
Values
[1] => 0
[1,2] => 0
[2,1] => 2
[1,2,3] => 0
[1,3,2] => 2
[2,1,3] => 2
[2,3,1] => 6
[3,1,2] => 6
[3,2,1] => 8
[1,2,3,4] => 0
[1,2,4,3] => 2
[1,3,2,4] => 2
[1,3,4,2] => 6
[1,4,2,3] => 6
[1,4,3,2] => 8
[2,1,3,4] => 2
[2,1,4,3] => 4
[2,3,1,4] => 6
[2,3,4,1] => 12
[2,4,1,3] => 10
[2,4,3,1] => 14
[3,1,2,4] => 6
[3,1,4,2] => 10
[3,2,1,4] => 8
[3,2,4,1] => 14
[3,4,1,2] => 16
[3,4,2,1] => 18
[4,1,2,3] => 12
[4,1,3,2] => 14
[4,2,1,3] => 14
[4,2,3,1] => 18
[4,3,1,2] => 18
[4,3,2,1] => 20
[1,2,3,4,5] => 0
[1,2,3,5,4] => 2
[1,2,4,3,5] => 2
[1,2,4,5,3] => 6
[1,2,5,3,4] => 6
[1,2,5,4,3] => 8
[1,3,2,4,5] => 2
[1,3,2,5,4] => 4
[1,3,4,2,5] => 6
[1,3,4,5,2] => 12
[1,3,5,2,4] => 10
[1,3,5,4,2] => 14
[1,4,2,3,5] => 6
[1,4,2,5,3] => 10
[1,4,3,2,5] => 8
[1,4,3,5,2] => 14
[1,4,5,2,3] => 16
[1,4,5,3,2] => 18
[1,5,2,3,4] => 12
[1,5,2,4,3] => 14
[1,5,3,2,4] => 14
[1,5,3,4,2] => 18
[1,5,4,2,3] => 18
[1,5,4,3,2] => 20
[2,1,3,4,5] => 2
[2,1,3,5,4] => 4
[2,1,4,3,5] => 4
[2,1,4,5,3] => 8
[2,1,5,3,4] => 8
[2,1,5,4,3] => 10
[2,3,1,4,5] => 6
[2,3,1,5,4] => 8
[2,3,4,1,5] => 12
[2,3,4,5,1] => 20
[2,3,5,1,4] => 16
[2,3,5,4,1] => 22
[2,4,1,3,5] => 10
[2,4,1,5,3] => 14
[2,4,3,1,5] => 14
[2,4,3,5,1] => 22
[2,4,5,1,3] => 22
[2,4,5,3,1] => 26
[2,5,1,3,4] => 16
[2,5,1,4,3] => 18
[2,5,3,1,4] => 20
[2,5,3,4,1] => 26
[2,5,4,1,3] => 24
[2,5,4,3,1] => 28
[3,1,2,4,5] => 6
[3,1,2,5,4] => 8
[3,1,4,2,5] => 10
[3,1,4,5,2] => 16
[3,1,5,2,4] => 14
[3,1,5,4,2] => 18
[3,2,1,4,5] => 8
[3,2,1,5,4] => 10
[3,2,4,1,5] => 14
[3,2,4,5,1] => 22
[3,2,5,1,4] => 18
[3,2,5,4,1] => 24
[3,4,1,2,5] => 16
[3,4,1,5,2] => 22
[3,4,2,1,5] => 18
[3,4,2,5,1] => 26
[3,4,5,1,2] => 30
[3,4,5,2,1] => 32
[3,5,1,2,4] => 22
[3,5,1,4,2] => 26
[3,5,2,1,4] => 24
[3,5,2,4,1] => 30
[3,5,4,1,2] => 32
[3,5,4,2,1] => 34
[4,1,2,3,5] => 12
[4,1,2,5,3] => 16
[4,1,3,2,5] => 14
[4,1,3,5,2] => 20
[4,1,5,2,3] => 22
[4,1,5,3,2] => 24
[4,2,1,3,5] => 14
[4,2,1,5,3] => 18
[4,2,3,1,5] => 18
[4,2,3,5,1] => 26
[4,2,5,1,3] => 26
[4,2,5,3,1] => 30
[4,3,1,2,5] => 18
[4,3,1,5,2] => 24
[4,3,2,1,5] => 20
[4,3,2,5,1] => 28
[4,3,5,1,2] => 32
[4,3,5,2,1] => 34
[4,5,1,2,3] => 30
[4,5,1,3,2] => 32
[4,5,2,1,3] => 32
[4,5,2,3,1] => 36
[4,5,3,1,2] => 36
[4,5,3,2,1] => 38
[5,1,2,3,4] => 20
[5,1,2,4,3] => 22
[5,1,3,2,4] => 22
[5,1,3,4,2] => 26
[5,1,4,2,3] => 26
[5,1,4,3,2] => 28
[5,2,1,3,4] => 22
[5,2,1,4,3] => 24
[5,2,3,1,4] => 26
[5,2,3,4,1] => 32
[5,2,4,1,3] => 30
[5,2,4,3,1] => 34
[5,3,1,2,4] => 26
[5,3,1,4,2] => 30
[5,3,2,1,4] => 28
[5,3,2,4,1] => 34
[5,3,4,1,2] => 36
[5,3,4,2,1] => 38
[5,4,1,2,3] => 32
[5,4,1,3,2] => 34
[5,4,2,1,3] => 34
[5,4,2,3,1] => 38
[5,4,3,1,2] => 38
[5,4,3,2,1] => 40
[1,2,3,4,5,6] => 0
[1,2,3,4,6,5] => 2
[1,2,3,5,4,6] => 2
[1,2,3,5,6,4] => 6
[1,2,3,6,4,5] => 6
[1,2,3,6,5,4] => 8
[1,2,4,3,5,6] => 2
[1,2,4,3,6,5] => 4
[1,2,4,5,3,6] => 6
[1,2,4,5,6,3] => 12
[1,2,4,6,3,5] => 10
[1,2,4,6,5,3] => 14
[1,2,5,3,4,6] => 6
[1,2,5,3,6,4] => 10
[1,2,5,4,3,6] => 8
[1,2,5,4,6,3] => 14
[1,2,5,6,3,4] => 16
[1,2,5,6,4,3] => 18
[1,2,6,3,4,5] => 12
[1,2,6,3,5,4] => 14
[1,2,6,4,3,5] => 14
[1,2,6,4,5,3] => 18
[1,2,6,5,3,4] => 18
[1,2,6,5,4,3] => 20
[1,3,2,4,5,6] => 2
[1,3,2,4,6,5] => 4
[1,3,2,5,4,6] => 4
[1,3,2,5,6,4] => 8
[1,3,2,6,4,5] => 8
[1,3,2,6,5,4] => 10
[1,3,4,2,5,6] => 6
[1,3,4,2,6,5] => 8
[1,3,4,5,2,6] => 12
[1,3,4,5,6,2] => 20
[1,3,4,6,2,5] => 16
[1,3,4,6,5,2] => 22
[1,3,5,2,4,6] => 10
[1,3,5,2,6,4] => 14
[1,3,5,4,2,6] => 14
[1,3,5,4,6,2] => 22
[1,3,5,6,2,4] => 22
[1,3,5,6,4,2] => 26
[1,3,6,2,4,5] => 16
[1,3,6,2,5,4] => 18
[1,3,6,4,2,5] => 20
[1,3,6,4,5,2] => 26
[1,3,6,5,2,4] => 24
[1,3,6,5,4,2] => 28
[1,4,2,3,5,6] => 6
[1,4,2,3,6,5] => 8
[1,4,2,5,3,6] => 10
[1,4,2,5,6,3] => 16
[1,4,2,6,3,5] => 14
[1,4,2,6,5,3] => 18
[1,4,3,2,5,6] => 8
[1,4,3,2,6,5] => 10
[1,4,3,5,2,6] => 14
[1,4,3,5,6,2] => 22
[1,4,3,6,2,5] => 18
[1,4,3,6,5,2] => 24
[1,4,5,2,3,6] => 16
[1,4,5,2,6,3] => 22
[1,4,5,3,2,6] => 18
[1,4,5,3,6,2] => 26
[1,4,5,6,2,3] => 30
[1,4,5,6,3,2] => 32
[1,4,6,2,3,5] => 22
[1,4,6,2,5,3] => 26
[1,4,6,3,2,5] => 24
[1,4,6,3,5,2] => 30
[1,4,6,5,2,3] => 32
[1,4,6,5,3,2] => 34
[1,5,2,3,4,6] => 12
[1,5,2,3,6,4] => 16
[1,5,2,4,3,6] => 14
[1,5,2,4,6,3] => 20
[1,5,2,6,3,4] => 22
[1,5,2,6,4,3] => 24
[1,5,3,2,4,6] => 14
[1,5,3,2,6,4] => 18
[1,5,3,4,2,6] => 18
[1,5,3,4,6,2] => 26
[1,5,3,6,2,4] => 26
[1,5,3,6,4,2] => 30
[1,5,4,2,3,6] => 18
[1,5,4,2,6,3] => 24
[1,5,4,3,2,6] => 20
[1,5,4,3,6,2] => 28
[1,5,4,6,2,3] => 32
[1,5,4,6,3,2] => 34
[1,5,6,2,3,4] => 30
[1,5,6,2,4,3] => 32
[1,5,6,3,2,4] => 32
[1,5,6,3,4,2] => 36
[1,5,6,4,2,3] => 36
[1,5,6,4,3,2] => 38
[1,6,2,3,4,5] => 20
[1,6,2,3,5,4] => 22
[1,6,2,4,3,5] => 22
[1,6,2,4,5,3] => 26
[1,6,2,5,3,4] => 26
[1,6,2,5,4,3] => 28
[1,6,3,2,4,5] => 22
[1,6,3,2,5,4] => 24
[1,6,3,4,2,5] => 26
[1,6,3,4,5,2] => 32
[1,6,3,5,2,4] => 30
[1,6,3,5,4,2] => 34
[1,6,4,2,3,5] => 26
[1,6,4,2,5,3] => 30
[1,6,4,3,2,5] => 28
[1,6,4,3,5,2] => 34
[1,6,4,5,2,3] => 36
[1,6,4,5,3,2] => 38
[1,6,5,2,3,4] => 32
[1,6,5,2,4,3] => 34
[1,6,5,3,2,4] => 34
[1,6,5,3,4,2] => 38
[1,6,5,4,2,3] => 38
[1,6,5,4,3,2] => 40
[2,1,3,4,5,6] => 2
[2,1,3,4,6,5] => 4
[2,1,3,5,4,6] => 4
[2,1,3,5,6,4] => 8
[2,1,3,6,4,5] => 8
[2,1,3,6,5,4] => 10
[2,1,4,3,5,6] => 4
[2,1,4,3,6,5] => 6
[2,1,4,5,3,6] => 8
[2,1,4,5,6,3] => 14
[2,1,4,6,3,5] => 12
[2,1,4,6,5,3] => 16
[2,1,5,3,4,6] => 8
[2,1,5,3,6,4] => 12
[2,1,5,4,3,6] => 10
[2,1,5,4,6,3] => 16
[2,1,5,6,3,4] => 18
[2,1,5,6,4,3] => 20
[2,1,6,3,4,5] => 14
[2,1,6,3,5,4] => 16
[2,1,6,4,3,5] => 16
[2,1,6,4,5,3] => 20
[2,1,6,5,3,4] => 20
[2,1,6,5,4,3] => 22
[2,3,1,4,5,6] => 6
[2,3,1,4,6,5] => 8
[2,3,1,5,4,6] => 8
[2,3,1,5,6,4] => 12
[2,3,1,6,4,5] => 12
[2,3,1,6,5,4] => 14
[2,3,4,1,5,6] => 12
[2,3,4,1,6,5] => 14
[2,3,4,5,1,6] => 20
[2,3,4,5,6,1] => 30
[2,3,4,6,1,5] => 24
[2,3,4,6,5,1] => 32
[2,3,5,1,4,6] => 16
[2,3,5,1,6,4] => 20
[2,3,5,4,1,6] => 22
[2,3,5,4,6,1] => 32
[2,3,5,6,1,4] => 30
[2,3,5,6,4,1] => 36
[2,3,6,1,4,5] => 22
[2,3,6,1,5,4] => 24
[2,3,6,4,1,5] => 28
[2,3,6,4,5,1] => 36
[2,3,6,5,1,4] => 32
[2,3,6,5,4,1] => 38
[2,4,1,3,5,6] => 10
[2,4,1,3,6,5] => 12
[2,4,1,5,3,6] => 14
[2,4,1,5,6,3] => 20
[2,4,1,6,3,5] => 18
[2,4,1,6,5,3] => 22
[2,4,3,1,5,6] => 14
[2,4,3,1,6,5] => 16
[2,4,3,5,1,6] => 22
[2,4,3,5,6,1] => 32
[2,4,3,6,1,5] => 26
[2,4,3,6,5,1] => 34
[2,4,5,1,3,6] => 22
[2,4,5,1,6,3] => 28
[2,4,5,3,1,6] => 26
[2,4,5,3,6,1] => 36
[2,4,5,6,1,3] => 38
[2,4,5,6,3,1] => 42
[2,4,6,1,3,5] => 28
[2,4,6,1,5,3] => 32
[2,4,6,3,1,5] => 32
[2,4,6,3,5,1] => 40
[2,4,6,5,1,3] => 40
[2,4,6,5,3,1] => 44
[2,5,1,3,4,6] => 16
[2,5,1,3,6,4] => 20
[2,5,1,4,3,6] => 18
[2,5,1,4,6,3] => 24
[2,5,1,6,3,4] => 26
[2,5,1,6,4,3] => 28
[2,5,3,1,4,6] => 20
[2,5,3,1,6,4] => 24
[2,5,3,4,1,6] => 26
[2,5,3,4,6,1] => 36
[2,5,3,6,1,4] => 34
[2,5,3,6,4,1] => 40
[2,5,4,1,3,6] => 24
[2,5,4,1,6,3] => 30
[2,5,4,3,1,6] => 28
[2,5,4,3,6,1] => 38
[2,5,4,6,1,3] => 40
[2,5,4,6,3,1] => 44
[2,5,6,1,3,4] => 36
[2,5,6,1,4,3] => 38
[2,5,6,3,1,4] => 40
[2,5,6,3,4,1] => 46
[2,5,6,4,1,3] => 44
[2,5,6,4,3,1] => 48
[2,6,1,3,4,5] => 24
[2,6,1,3,5,4] => 26
[2,6,1,4,3,5] => 26
[2,6,1,4,5,3] => 30
[2,6,1,5,3,4] => 30
[2,6,1,5,4,3] => 32
[2,6,3,1,4,5] => 28
[2,6,3,1,5,4] => 30
[2,6,3,4,1,5] => 34
[2,6,3,4,5,1] => 42
[2,6,3,5,1,4] => 38
[2,6,3,5,4,1] => 44
[2,6,4,1,3,5] => 32
[2,6,4,1,5,3] => 36
[2,6,4,3,1,5] => 36
[2,6,4,3,5,1] => 44
[2,6,4,5,1,3] => 44
[2,6,4,5,3,1] => 48
[2,6,5,1,3,4] => 38
[2,6,5,1,4,3] => 40
[2,6,5,3,1,4] => 42
[2,6,5,3,4,1] => 48
[2,6,5,4,1,3] => 46
[2,6,5,4,3,1] => 50
[3,1,2,4,5,6] => 6
[3,1,2,4,6,5] => 8
[3,1,2,5,4,6] => 8
[3,1,2,5,6,4] => 12
[3,1,2,6,4,5] => 12
[3,1,2,6,5,4] => 14
[3,1,4,2,5,6] => 10
[3,1,4,2,6,5] => 12
[3,1,4,5,2,6] => 16
[3,1,4,5,6,2] => 24
[3,1,4,6,2,5] => 20
[3,1,4,6,5,2] => 26
[3,1,5,2,4,6] => 14
[3,1,5,2,6,4] => 18
[3,1,5,4,2,6] => 18
[3,1,5,4,6,2] => 26
[3,1,5,6,2,4] => 26
[3,1,5,6,4,2] => 30
[3,1,6,2,4,5] => 20
[3,1,6,2,5,4] => 22
[3,1,6,4,2,5] => 24
[3,1,6,4,5,2] => 30
[3,1,6,5,2,4] => 28
[3,1,6,5,4,2] => 32
[3,2,1,4,5,6] => 8
[3,2,1,4,6,5] => 10
[3,2,1,5,4,6] => 10
[3,2,1,5,6,4] => 14
[3,2,1,6,4,5] => 14
[3,2,1,6,5,4] => 16
[3,2,4,1,5,6] => 14
[3,2,4,1,6,5] => 16
[3,2,4,5,1,6] => 22
[3,2,4,5,6,1] => 32
[3,2,4,6,1,5] => 26
[3,2,4,6,5,1] => 34
[3,2,5,1,4,6] => 18
[3,2,5,1,6,4] => 22
[3,2,5,4,1,6] => 24
[3,2,5,4,6,1] => 34
[3,2,5,6,1,4] => 32
[3,2,5,6,4,1] => 38
[3,2,6,1,4,5] => 24
[3,2,6,1,5,4] => 26
[3,2,6,4,1,5] => 30
[3,2,6,4,5,1] => 38
[3,2,6,5,1,4] => 34
[3,2,6,5,4,1] => 40
[3,4,1,2,5,6] => 16
[3,4,1,2,6,5] => 18
[3,4,1,5,2,6] => 22
[3,4,1,5,6,2] => 30
[3,4,1,6,2,5] => 26
[3,4,1,6,5,2] => 32
[3,4,2,1,5,6] => 18
[3,4,2,1,6,5] => 20
[3,4,2,5,1,6] => 26
[3,4,2,5,6,1] => 36
[3,4,2,6,1,5] => 30
[3,4,2,6,5,1] => 38
[3,4,5,1,2,6] => 30
[3,4,5,1,6,2] => 38
[3,4,5,2,1,6] => 32
[3,4,5,2,6,1] => 42
[3,4,5,6,1,2] => 48
[3,4,5,6,2,1] => 50
[3,4,6,1,2,5] => 36
[3,4,6,1,5,2] => 42
[3,4,6,2,1,5] => 38
[3,4,6,2,5,1] => 46
[3,4,6,5,1,2] => 50
[3,4,6,5,2,1] => 52
[3,5,1,2,4,6] => 22
[3,5,1,2,6,4] => 26
[3,5,1,4,2,6] => 26
[3,5,1,4,6,2] => 34
[3,5,1,6,2,4] => 34
[3,5,1,6,4,2] => 38
[3,5,2,1,4,6] => 24
[3,5,2,1,6,4] => 28
[3,5,2,4,1,6] => 30
[3,5,2,4,6,1] => 40
[3,5,2,6,1,4] => 38
[3,5,2,6,4,1] => 44
[3,5,4,1,2,6] => 32
[3,5,4,1,6,2] => 40
[3,5,4,2,1,6] => 34
[3,5,4,2,6,1] => 44
[3,5,4,6,1,2] => 50
[3,5,4,6,2,1] => 52
[3,5,6,1,2,4] => 44
[3,5,6,1,4,2] => 48
[3,5,6,2,1,4] => 46
[3,5,6,2,4,1] => 52
[3,5,6,4,1,2] => 54
[3,5,6,4,2,1] => 56
[3,6,1,2,4,5] => 30
[3,6,1,2,5,4] => 32
[3,6,1,4,2,5] => 34
[3,6,1,4,5,2] => 40
[3,6,1,5,2,4] => 38
[3,6,1,5,4,2] => 42
[3,6,2,1,4,5] => 32
[3,6,2,1,5,4] => 34
[3,6,2,4,1,5] => 38
[3,6,2,4,5,1] => 46
[3,6,2,5,1,4] => 42
[3,6,2,5,4,1] => 48
[3,6,4,1,2,5] => 40
[3,6,4,1,5,2] => 46
[3,6,4,2,1,5] => 42
[3,6,4,2,5,1] => 50
[3,6,4,5,1,2] => 54
[3,6,4,5,2,1] => 56
[3,6,5,1,2,4] => 46
[3,6,5,1,4,2] => 50
[3,6,5,2,1,4] => 48
[3,6,5,2,4,1] => 54
[3,6,5,4,1,2] => 56
[3,6,5,4,2,1] => 58
[4,1,2,3,5,6] => 12
[4,1,2,3,6,5] => 14
[4,1,2,5,3,6] => 16
[4,1,2,5,6,3] => 22
[4,1,2,6,3,5] => 20
[4,1,2,6,5,3] => 24
[4,1,3,2,5,6] => 14
[4,1,3,2,6,5] => 16
[4,1,3,5,2,6] => 20
[4,1,3,5,6,2] => 28
[4,1,3,6,2,5] => 24
[4,1,3,6,5,2] => 30
[4,1,5,2,3,6] => 22
[4,1,5,2,6,3] => 28
[4,1,5,3,2,6] => 24
[4,1,5,3,6,2] => 32
[4,1,5,6,2,3] => 36
[4,1,5,6,3,2] => 38
[4,1,6,2,3,5] => 28
[4,1,6,2,5,3] => 32
[4,1,6,3,2,5] => 30
[4,1,6,3,5,2] => 36
[4,1,6,5,2,3] => 38
[4,1,6,5,3,2] => 40
[4,2,1,3,5,6] => 14
[4,2,1,3,6,5] => 16
[4,2,1,5,3,6] => 18
[4,2,1,5,6,3] => 24
[4,2,1,6,3,5] => 22
[4,2,1,6,5,3] => 26
[4,2,3,1,5,6] => 18
[4,2,3,1,6,5] => 20
[4,2,3,5,1,6] => 26
[4,2,3,5,6,1] => 36
[4,2,3,6,1,5] => 30
[4,2,3,6,5,1] => 38
[4,2,5,1,3,6] => 26
[4,2,5,1,6,3] => 32
[4,2,5,3,1,6] => 30
[4,2,5,3,6,1] => 40
[4,2,5,6,1,3] => 42
[4,2,5,6,3,1] => 46
[4,2,6,1,3,5] => 32
[4,2,6,1,5,3] => 36
[4,2,6,3,1,5] => 36
[4,2,6,3,5,1] => 44
[4,2,6,5,1,3] => 44
[4,2,6,5,3,1] => 48
[4,3,1,2,5,6] => 18
[4,3,1,2,6,5] => 20
[4,3,1,5,2,6] => 24
[4,3,1,5,6,2] => 32
[4,3,1,6,2,5] => 28
[4,3,1,6,5,2] => 34
[4,3,2,1,5,6] => 20
[4,3,2,1,6,5] => 22
[4,3,2,5,1,6] => 28
[4,3,2,5,6,1] => 38
[4,3,2,6,1,5] => 32
[4,3,2,6,5,1] => 40
[4,3,5,1,2,6] => 32
[4,3,5,1,6,2] => 40
[4,3,5,2,1,6] => 34
[4,3,5,2,6,1] => 44
[4,3,5,6,1,2] => 50
[4,3,5,6,2,1] => 52
[4,3,6,1,2,5] => 38
[4,3,6,1,5,2] => 44
[4,3,6,2,1,5] => 40
[4,3,6,2,5,1] => 48
[4,3,6,5,1,2] => 52
[4,3,6,5,2,1] => 54
[4,5,1,2,3,6] => 30
[4,5,1,2,6,3] => 36
[4,5,1,3,2,6] => 32
[4,5,1,3,6,2] => 40
[4,5,1,6,2,3] => 44
[4,5,1,6,3,2] => 46
[4,5,2,1,3,6] => 32
[4,5,2,1,6,3] => 38
[4,5,2,3,1,6] => 36
[4,5,2,3,6,1] => 46
[4,5,2,6,1,3] => 48
[4,5,2,6,3,1] => 52
[4,5,3,1,2,6] => 36
[4,5,3,1,6,2] => 44
[4,5,3,2,1,6] => 38
[4,5,3,2,6,1] => 48
[4,5,3,6,1,2] => 54
[4,5,3,6,2,1] => 56
[4,5,6,1,2,3] => 54
[4,5,6,1,3,2] => 56
[4,5,6,2,1,3] => 56
[4,5,6,2,3,1] => 60
[4,5,6,3,1,2] => 60
[4,5,6,3,2,1] => 62
[4,6,1,2,3,5] => 38
[4,6,1,2,5,3] => 42
[4,6,1,3,2,5] => 40
[4,6,1,3,5,2] => 46
[4,6,1,5,2,3] => 48
[4,6,1,5,3,2] => 50
[4,6,2,1,3,5] => 40
[4,6,2,1,5,3] => 44
[4,6,2,3,1,5] => 44
[4,6,2,3,5,1] => 52
[4,6,2,5,1,3] => 52
[4,6,2,5,3,1] => 56
[4,6,3,1,2,5] => 44
[4,6,3,1,5,2] => 50
[4,6,3,2,1,5] => 46
[4,6,3,2,5,1] => 54
[4,6,3,5,1,2] => 58
[4,6,3,5,2,1] => 60
[4,6,5,1,2,3] => 56
[4,6,5,1,3,2] => 58
[4,6,5,2,1,3] => 58
[4,6,5,2,3,1] => 62
[4,6,5,3,1,2] => 62
[4,6,5,3,2,1] => 64
[5,1,2,3,4,6] => 20
[5,1,2,3,6,4] => 24
[5,1,2,4,3,6] => 22
[5,1,2,4,6,3] => 28
[5,1,2,6,3,4] => 30
[5,1,2,6,4,3] => 32
[5,1,3,2,4,6] => 22
[5,1,3,2,6,4] => 26
[5,1,3,4,2,6] => 26
[5,1,3,4,6,2] => 34
[5,1,3,6,2,4] => 34
[5,1,3,6,4,2] => 38
[5,1,4,2,3,6] => 26
[5,1,4,2,6,3] => 32
[5,1,4,3,2,6] => 28
[5,1,4,3,6,2] => 36
[5,1,4,6,2,3] => 40
[5,1,4,6,3,2] => 42
[5,1,6,2,3,4] => 38
[5,1,6,2,4,3] => 40
[5,1,6,3,2,4] => 40
[5,1,6,3,4,2] => 44
[5,1,6,4,2,3] => 44
[5,1,6,4,3,2] => 46
[5,2,1,3,4,6] => 22
[5,2,1,3,6,4] => 26
[5,2,1,4,3,6] => 24
[5,2,1,4,6,3] => 30
[5,2,1,6,3,4] => 32
[5,2,1,6,4,3] => 34
[5,2,3,1,4,6] => 26
[5,2,3,1,6,4] => 30
[5,2,3,4,1,6] => 32
[5,2,3,4,6,1] => 42
[5,2,3,6,1,4] => 40
[5,2,3,6,4,1] => 46
[5,2,4,1,3,6] => 30
[5,2,4,1,6,3] => 36
[5,2,4,3,1,6] => 34
[5,2,4,3,6,1] => 44
[5,2,4,6,1,3] => 46
[5,2,4,6,3,1] => 50
[5,2,6,1,3,4] => 42
[5,2,6,1,4,3] => 44
[5,2,6,3,1,4] => 46
[5,2,6,3,4,1] => 52
[5,2,6,4,1,3] => 50
[5,2,6,4,3,1] => 54
[5,3,1,2,4,6] => 26
[5,3,1,2,6,4] => 30
[5,3,1,4,2,6] => 30
[5,3,1,4,6,2] => 38
[5,3,1,6,2,4] => 38
[5,3,1,6,4,2] => 42
[5,3,2,1,4,6] => 28
[5,3,2,1,6,4] => 32
[5,3,2,4,1,6] => 34
[5,3,2,4,6,1] => 44
[5,3,2,6,1,4] => 42
[5,3,2,6,4,1] => 48
[5,3,4,1,2,6] => 36
[5,3,4,1,6,2] => 44
[5,3,4,2,1,6] => 38
[5,3,4,2,6,1] => 48
[5,3,4,6,1,2] => 54
[5,3,4,6,2,1] => 56
[5,3,6,1,2,4] => 48
[5,3,6,1,4,2] => 52
[5,3,6,2,1,4] => 50
[5,3,6,2,4,1] => 56
[5,3,6,4,1,2] => 58
[5,3,6,4,2,1] => 60
[5,4,1,2,3,6] => 32
[5,4,1,2,6,3] => 38
[5,4,1,3,2,6] => 34
[5,4,1,3,6,2] => 42
[5,4,1,6,2,3] => 46
[5,4,1,6,3,2] => 48
[5,4,2,1,3,6] => 34
[5,4,2,1,6,3] => 40
[5,4,2,3,1,6] => 38
[5,4,2,3,6,1] => 48
[5,4,2,6,1,3] => 50
[5,4,2,6,3,1] => 54
[5,4,3,1,2,6] => 38
[5,4,3,1,6,2] => 46
[5,4,3,2,1,6] => 40
[5,4,3,2,6,1] => 50
[5,4,3,6,1,2] => 56
[5,4,3,6,2,1] => 58
[5,4,6,1,2,3] => 56
[5,4,6,1,3,2] => 58
[5,4,6,2,1,3] => 58
[5,4,6,2,3,1] => 62
[5,4,6,3,1,2] => 62
[5,4,6,3,2,1] => 64
[5,6,1,2,3,4] => 48
[5,6,1,2,4,3] => 50
[5,6,1,3,2,4] => 50
[5,6,1,3,4,2] => 54
[5,6,1,4,2,3] => 54
[5,6,1,4,3,2] => 56
[5,6,2,1,3,4] => 50
[5,6,2,1,4,3] => 52
[5,6,2,3,1,4] => 54
[5,6,2,3,4,1] => 60
[5,6,2,4,1,3] => 58
[5,6,2,4,3,1] => 62
[5,6,3,1,2,4] => 54
[5,6,3,1,4,2] => 58
[5,6,3,2,1,4] => 56
[5,6,3,2,4,1] => 62
[5,6,3,4,1,2] => 64
[5,6,3,4,2,1] => 66
[5,6,4,1,2,3] => 60
[5,6,4,1,3,2] => 62
[5,6,4,2,1,3] => 62
[5,6,4,2,3,1] => 66
[5,6,4,3,1,2] => 66
[5,6,4,3,2,1] => 68
[6,1,2,3,4,5] => 30
[6,1,2,3,5,4] => 32
[6,1,2,4,3,5] => 32
[6,1,2,4,5,3] => 36
[6,1,2,5,3,4] => 36
[6,1,2,5,4,3] => 38
[6,1,3,2,4,5] => 32
[6,1,3,2,5,4] => 34
[6,1,3,4,2,5] => 36
[6,1,3,4,5,2] => 42
[6,1,3,5,2,4] => 40
[6,1,3,5,4,2] => 44
[6,1,4,2,3,5] => 36
[6,1,4,2,5,3] => 40
[6,1,4,3,2,5] => 38
[6,1,4,3,5,2] => 44
[6,1,4,5,2,3] => 46
[6,1,4,5,3,2] => 48
[6,1,5,2,3,4] => 42
[6,1,5,2,4,3] => 44
[6,1,5,3,2,4] => 44
[6,1,5,3,4,2] => 48
[6,1,5,4,2,3] => 48
[6,1,5,4,3,2] => 50
[6,2,1,3,4,5] => 32
[6,2,1,3,5,4] => 34
[6,2,1,4,3,5] => 34
[6,2,1,4,5,3] => 38
[6,2,1,5,3,4] => 38
[6,2,1,5,4,3] => 40
[6,2,3,1,4,5] => 36
[6,2,3,1,5,4] => 38
[6,2,3,4,1,5] => 42
[6,2,3,4,5,1] => 50
[6,2,3,5,1,4] => 46
[6,2,3,5,4,1] => 52
[6,2,4,1,3,5] => 40
[6,2,4,1,5,3] => 44
[6,2,4,3,1,5] => 44
[6,2,4,3,5,1] => 52
[6,2,4,5,1,3] => 52
[6,2,4,5,3,1] => 56
[6,2,5,1,3,4] => 46
[6,2,5,1,4,3] => 48
[6,2,5,3,1,4] => 50
[6,2,5,3,4,1] => 56
[6,2,5,4,1,3] => 54
[6,2,5,4,3,1] => 58
[6,3,1,2,4,5] => 36
[6,3,1,2,5,4] => 38
[6,3,1,4,2,5] => 40
[6,3,1,4,5,2] => 46
[6,3,1,5,2,4] => 44
[6,3,1,5,4,2] => 48
[6,3,2,1,4,5] => 38
[6,3,2,1,5,4] => 40
[6,3,2,4,1,5] => 44
[6,3,2,4,5,1] => 52
[6,3,2,5,1,4] => 48
[6,3,2,5,4,1] => 54
[6,3,4,1,2,5] => 46
[6,3,4,1,5,2] => 52
[6,3,4,2,1,5] => 48
[6,3,4,2,5,1] => 56
[6,3,4,5,1,2] => 60
[6,3,4,5,2,1] => 62
[6,3,5,1,2,4] => 52
[6,3,5,1,4,2] => 56
[6,3,5,2,1,4] => 54
[6,3,5,2,4,1] => 60
[6,3,5,4,1,2] => 62
[6,3,5,4,2,1] => 64
[6,4,1,2,3,5] => 42
[6,4,1,2,5,3] => 46
[6,4,1,3,2,5] => 44
[6,4,1,3,5,2] => 50
[6,4,1,5,2,3] => 52
[6,4,1,5,3,2] => 54
[6,4,2,1,3,5] => 44
[6,4,2,1,5,3] => 48
[6,4,2,3,1,5] => 48
[6,4,2,3,5,1] => 56
[6,4,2,5,1,3] => 56
[6,4,2,5,3,1] => 60
[6,4,3,1,2,5] => 48
[6,4,3,1,5,2] => 54
[6,4,3,2,1,5] => 50
[6,4,3,2,5,1] => 58
[6,4,3,5,1,2] => 62
[6,4,3,5,2,1] => 64
[6,4,5,1,2,3] => 60
[6,4,5,1,3,2] => 62
[6,4,5,2,1,3] => 62
[6,4,5,2,3,1] => 66
[6,4,5,3,1,2] => 66
[6,4,5,3,2,1] => 68
[6,5,1,2,3,4] => 50
[6,5,1,2,4,3] => 52
[6,5,1,3,2,4] => 52
[6,5,1,3,4,2] => 56
[6,5,1,4,2,3] => 56
[6,5,1,4,3,2] => 58
[6,5,2,1,3,4] => 52
[6,5,2,1,4,3] => 54
[6,5,2,3,1,4] => 56
[6,5,2,3,4,1] => 62
[6,5,2,4,1,3] => 60
[6,5,2,4,3,1] => 64
[6,5,3,1,2,4] => 56
[6,5,3,1,4,2] => 60
[6,5,3,2,1,4] => 58
[6,5,3,2,4,1] => 64
[6,5,3,4,1,2] => 66
[6,5,3,4,2,1] => 68
[6,5,4,1,2,3] => 62
[6,5,4,1,3,2] => 64
[6,5,4,2,1,3] => 64
[6,5,4,2,3,1] => 68
[6,5,4,3,1,2] => 68
[6,5,4,3,2,1] => 70
[1,2,3,4,5,6,7] => 0
[1,2,3,4,5,7,6] => 2
[1,2,3,4,6,5,7] => 2
[1,2,3,4,6,7,5] => 6
[1,2,3,4,7,5,6] => 6
[1,2,3,4,7,6,5] => 8
[1,2,3,5,4,6,7] => 2
[1,2,3,5,4,7,6] => 4
[1,2,3,5,6,4,7] => 6
[1,2,3,5,6,7,4] => 12
[1,2,3,5,7,4,6] => 10
[1,2,3,5,7,6,4] => 14
[1,2,3,6,4,5,7] => 6
[1,2,3,6,4,7,5] => 10
[1,2,3,6,5,4,7] => 8
[1,2,3,6,5,7,4] => 14
[1,2,3,6,7,4,5] => 16
[1,2,3,6,7,5,4] => 18
[1,2,3,7,4,5,6] => 12
[1,2,3,7,4,6,5] => 14
[1,2,3,7,5,4,6] => 14
[1,2,3,7,5,6,4] => 18
[1,2,3,7,6,4,5] => 18
[1,2,3,7,6,5,4] => 20
[1,2,4,3,5,6,7] => 2
[1,2,4,3,5,7,6] => 4
[1,2,4,3,6,5,7] => 4
[1,2,4,3,6,7,5] => 8
[1,2,4,3,7,5,6] => 8
[1,2,4,3,7,6,5] => 10
[1,2,4,5,3,6,7] => 6
[1,2,4,5,3,7,6] => 8
[1,2,4,5,6,3,7] => 12
[1,2,4,5,6,7,3] => 20
[1,2,4,5,7,3,6] => 16
[1,2,4,5,7,6,3] => 22
[1,2,4,6,3,5,7] => 10
[1,2,4,6,3,7,5] => 14
[1,2,4,6,5,3,7] => 14
[1,2,4,6,5,7,3] => 22
[1,2,4,6,7,3,5] => 22
[1,2,4,6,7,5,3] => 26
[1,2,4,7,3,5,6] => 16
[1,2,4,7,3,6,5] => 18
[1,2,4,7,5,3,6] => 20
[1,2,4,7,5,6,3] => 26
[1,2,4,7,6,3,5] => 24
[1,2,4,7,6,5,3] => 28
[1,2,5,3,4,6,7] => 6
[1,2,5,3,4,7,6] => 8
[1,2,5,3,6,4,7] => 10
[1,2,5,3,6,7,4] => 16
[1,2,5,3,7,4,6] => 14
[1,2,5,3,7,6,4] => 18
[1,2,5,4,3,6,7] => 8
[1,2,5,4,3,7,6] => 10
[1,2,5,4,6,3,7] => 14
[1,2,5,4,6,7,3] => 22
[1,2,5,4,7,3,6] => 18
[1,2,5,4,7,6,3] => 24
[1,2,5,6,3,4,7] => 16
[1,2,5,6,3,7,4] => 22
[1,2,5,6,4,3,7] => 18
[1,2,5,6,4,7,3] => 26
[1,2,5,6,7,3,4] => 30
[1,2,5,6,7,4,3] => 32
[1,2,5,7,3,4,6] => 22
[1,2,5,7,3,6,4] => 26
[1,2,5,7,4,3,6] => 24
[1,2,5,7,4,6,3] => 30
[1,2,5,7,6,3,4] => 32
[1,2,5,7,6,4,3] => 34
[1,2,6,3,4,5,7] => 12
[1,2,6,3,4,7,5] => 16
[1,2,6,3,5,4,7] => 14
[1,2,6,3,5,7,4] => 20
[1,2,6,3,7,4,5] => 22
[1,2,6,3,7,5,4] => 24
[1,2,6,4,3,5,7] => 14
[1,2,6,4,3,7,5] => 18
[1,2,6,4,5,3,7] => 18
[1,2,6,4,5,7,3] => 26
[1,2,6,4,7,3,5] => 26
[1,2,6,4,7,5,3] => 30
[1,2,6,5,3,4,7] => 18
[1,2,6,5,3,7,4] => 24
[1,2,6,5,4,3,7] => 20
[1,2,6,5,4,7,3] => 28
[1,2,6,5,7,3,4] => 32
[1,2,6,5,7,4,3] => 34
[1,2,6,7,3,4,5] => 30
[1,2,6,7,3,5,4] => 32
[1,2,6,7,4,3,5] => 32
[1,2,6,7,4,5,3] => 36
[1,2,6,7,5,3,4] => 36
[1,2,6,7,5,4,3] => 38
[1,2,7,3,4,5,6] => 20
[1,2,7,3,4,6,5] => 22
[1,2,7,3,5,4,6] => 22
[1,2,7,3,5,6,4] => 26
[1,2,7,3,6,4,5] => 26
[1,2,7,3,6,5,4] => 28
[1,2,7,4,3,5,6] => 22
[1,2,7,4,3,6,5] => 24
[1,2,7,4,5,3,6] => 26
[1,2,7,4,5,6,3] => 32
[1,2,7,4,6,3,5] => 30
[1,2,7,4,6,5,3] => 34
[1,2,7,5,3,4,6] => 26
[1,2,7,5,3,6,4] => 30
[1,2,7,5,4,3,6] => 28
[1,2,7,5,4,6,3] => 34
[1,2,7,5,6,3,4] => 36
[1,2,7,5,6,4,3] => 38
[1,2,7,6,3,4,5] => 32
[1,2,7,6,3,5,4] => 34
[1,2,7,6,4,3,5] => 34
[1,2,7,6,4,5,3] => 38
[1,2,7,6,5,3,4] => 38
[1,2,7,6,5,4,3] => 40
[1,3,2,4,5,6,7] => 2
[1,3,2,4,5,7,6] => 4
[1,3,2,4,6,5,7] => 4
[1,3,2,4,6,7,5] => 8
[1,3,2,4,7,5,6] => 8
[1,3,2,4,7,6,5] => 10
[1,3,2,5,4,6,7] => 4
[1,3,2,5,4,7,6] => 6
[1,3,2,5,6,4,7] => 8
[1,3,2,5,6,7,4] => 14
[1,3,2,5,7,4,6] => 12
[1,3,2,5,7,6,4] => 16
[1,3,2,6,4,5,7] => 8
[1,3,2,6,4,7,5] => 12
[1,3,2,6,5,4,7] => 10
[1,3,2,6,5,7,4] => 16
[1,3,2,6,7,4,5] => 18
[1,3,2,6,7,5,4] => 20
[1,3,2,7,4,5,6] => 14
[1,3,2,7,4,6,5] => 16
[1,3,2,7,5,4,6] => 16
[1,3,2,7,5,6,4] => 20
[1,3,2,7,6,4,5] => 20
[1,3,2,7,6,5,4] => 22
[1,3,4,2,5,6,7] => 6
[1,3,4,2,5,7,6] => 8
[1,3,4,2,6,5,7] => 8
[1,3,4,2,6,7,5] => 12
[1,3,4,2,7,5,6] => 12
[1,3,4,2,7,6,5] => 14
[1,3,4,5,2,6,7] => 12
[1,3,4,5,2,7,6] => 14
[1,3,4,5,6,2,7] => 20
[1,3,4,5,6,7,2] => 30
[1,3,4,5,7,2,6] => 24
[1,3,4,5,7,6,2] => 32
[1,3,4,6,2,5,7] => 16
[1,3,4,6,2,7,5] => 20
[1,3,4,6,5,2,7] => 22
[1,3,4,6,5,7,2] => 32
[1,3,4,6,7,2,5] => 30
[1,3,4,6,7,5,2] => 36
[1,3,4,7,2,5,6] => 22
[1,3,4,7,2,6,5] => 24
[1,3,4,7,5,2,6] => 28
[1,3,4,7,5,6,2] => 36
[1,3,4,7,6,2,5] => 32
[1,3,4,7,6,5,2] => 38
[1,3,5,2,4,6,7] => 10
[1,3,5,2,4,7,6] => 12
[1,3,5,2,6,4,7] => 14
[1,3,5,2,6,7,4] => 20
[1,3,5,2,7,4,6] => 18
[1,3,5,2,7,6,4] => 22
[1,3,5,4,2,6,7] => 14
[1,3,5,4,2,7,6] => 16
[1,3,5,4,6,2,7] => 22
[1,3,5,4,6,7,2] => 32
[1,3,5,4,7,2,6] => 26
[1,3,5,4,7,6,2] => 34
[1,3,5,6,2,4,7] => 22
[1,3,5,6,2,7,4] => 28
[1,3,5,6,4,2,7] => 26
[1,3,5,6,4,7,2] => 36
[1,3,5,6,7,2,4] => 38
[1,3,5,6,7,4,2] => 42
[1,3,5,7,2,4,6] => 28
[1,3,5,7,2,6,4] => 32
[1,3,5,7,4,2,6] => 32
[1,3,5,7,4,6,2] => 40
[1,3,5,7,6,2,4] => 40
[1,3,5,7,6,4,2] => 44
[1,3,6,2,4,5,7] => 16
[1,3,6,2,4,7,5] => 20
[1,3,6,2,5,4,7] => 18
[1,3,6,2,5,7,4] => 24
[1,3,6,2,7,4,5] => 26
[1,3,6,2,7,5,4] => 28
[1,3,6,4,2,5,7] => 20
[1,3,6,4,2,7,5] => 24
[1,3,6,4,5,2,7] => 26
[1,3,6,4,5,7,2] => 36
[1,3,6,4,7,2,5] => 34
[1,3,6,4,7,5,2] => 40
[1,3,6,5,2,4,7] => 24
[1,3,6,5,2,7,4] => 30
[1,3,6,5,4,2,7] => 28
[1,3,6,5,4,7,2] => 38
[1,3,6,5,7,2,4] => 40
[1,3,6,5,7,4,2] => 44
[1,3,6,7,2,4,5] => 36
[1,3,6,7,2,5,4] => 38
[1,3,6,7,4,2,5] => 40
[1,3,6,7,4,5,2] => 46
[1,3,6,7,5,2,4] => 44
[1,3,6,7,5,4,2] => 48
[1,3,7,2,4,5,6] => 24
[1,3,7,2,4,6,5] => 26
[1,3,7,2,5,4,6] => 26
[1,3,7,2,5,6,4] => 30
[1,3,7,2,6,4,5] => 30
[1,3,7,2,6,5,4] => 32
[1,3,7,4,2,5,6] => 28
[1,3,7,4,2,6,5] => 30
[1,3,7,4,5,2,6] => 34
[1,3,7,4,5,6,2] => 42
[1,3,7,4,6,2,5] => 38
[1,3,7,4,6,5,2] => 44
[1,3,7,5,2,4,6] => 32
[1,3,7,5,2,6,4] => 36
[1,3,7,5,4,2,6] => 36
[1,3,7,5,4,6,2] => 44
[1,3,7,5,6,2,4] => 44
[1,3,7,5,6,4,2] => 48
[1,3,7,6,2,4,5] => 38
[1,3,7,6,2,5,4] => 40
[1,3,7,6,4,2,5] => 42
[1,3,7,6,4,5,2] => 48
[1,3,7,6,5,2,4] => 46
[1,3,7,6,5,4,2] => 50
[1,4,2,3,5,6,7] => 6
[1,4,2,3,5,7,6] => 8
[1,4,2,3,6,5,7] => 8
[1,4,2,3,6,7,5] => 12
[1,4,2,3,7,5,6] => 12
[1,4,2,3,7,6,5] => 14
[1,4,2,5,3,6,7] => 10
[1,4,2,5,3,7,6] => 12
[1,4,2,5,6,3,7] => 16
[1,4,2,5,6,7,3] => 24
[1,4,2,5,7,3,6] => 20
[1,4,2,5,7,6,3] => 26
[1,4,2,6,3,5,7] => 14
[1,4,2,6,3,7,5] => 18
[1,4,2,6,5,3,7] => 18
[1,4,2,6,5,7,3] => 26
[1,4,2,6,7,3,5] => 26
[1,4,2,6,7,5,3] => 30
[1,4,2,7,3,5,6] => 20
[1,4,2,7,3,6,5] => 22
[1,4,2,7,5,3,6] => 24
[1,4,2,7,5,6,3] => 30
[1,4,2,7,6,3,5] => 28
[1,4,2,7,6,5,3] => 32
[1,4,3,2,5,6,7] => 8
[1,4,3,2,5,7,6] => 10
[1,4,3,2,6,5,7] => 10
[1,4,3,2,6,7,5] => 14
[1,4,3,2,7,5,6] => 14
[1,4,3,2,7,6,5] => 16
[1,4,3,5,2,6,7] => 14
[1,4,3,5,2,7,6] => 16
[1,4,3,5,6,2,7] => 22
[1,4,3,5,6,7,2] => 32
[1,4,3,5,7,2,6] => 26
[1,4,3,5,7,6,2] => 34
[1,4,3,6,2,5,7] => 18
[1,4,3,6,2,7,5] => 22
[1,4,3,6,5,2,7] => 24
[1,4,3,6,5,7,2] => 34
[1,4,3,6,7,2,5] => 32
[1,4,3,6,7,5,2] => 38
[1,4,3,7,2,5,6] => 24
[1,4,3,7,2,6,5] => 26
[1,4,3,7,5,2,6] => 30
[1,4,3,7,5,6,2] => 38
[1,4,3,7,6,2,5] => 34
[1,4,3,7,6,5,2] => 40
[1,4,5,2,3,6,7] => 16
[1,4,5,2,3,7,6] => 18
[1,4,5,2,6,3,7] => 22
[1,4,5,2,6,7,3] => 30
[1,4,5,2,7,3,6] => 26
[1,4,5,2,7,6,3] => 32
[1,4,5,3,2,6,7] => 18
[1,4,5,3,2,7,6] => 20
[1,4,5,3,6,2,7] => 26
[1,4,5,3,6,7,2] => 36
[1,4,5,3,7,2,6] => 30
[1,4,5,3,7,6,2] => 38
[1,4,5,6,2,3,7] => 30
[1,4,5,6,2,7,3] => 38
[1,4,5,6,3,2,7] => 32
[1,4,5,6,3,7,2] => 42
[1,4,5,6,7,2,3] => 48
[1,4,5,6,7,3,2] => 50
[1,4,5,7,2,3,6] => 36
[1,4,5,7,2,6,3] => 42
[1,4,5,7,3,2,6] => 38
[1,4,5,7,3,6,2] => 46
[1,4,5,7,6,2,3] => 50
[1,4,5,7,6,3,2] => 52
[1,4,6,2,3,5,7] => 22
[1,4,6,2,3,7,5] => 26
[1,4,6,2,5,3,7] => 26
[1,4,6,2,5,7,3] => 34
[1,4,6,2,7,3,5] => 34
[1,4,6,2,7,5,3] => 38
[1,4,6,3,2,5,7] => 24
[1,4,6,3,2,7,5] => 28
[1,4,6,3,5,2,7] => 30
[1,4,6,3,5,7,2] => 40
[1,4,6,3,7,2,5] => 38
[1,4,6,3,7,5,2] => 44
[1,4,6,5,2,3,7] => 32
[1,4,6,5,2,7,3] => 40
[1,4,6,5,3,2,7] => 34
[1,4,6,5,3,7,2] => 44
[1,4,6,7,2,3,5] => 44
[1,4,6,7,5,3,2] => 56
[1,4,7,2,3,5,6] => 30
[1,4,7,6,5,3,2] => 58
[1,5,2,3,4,7,6] => 14
[1,5,2,7,3,4,6] => 28
[1,5,4,7,6,3,2] => 54
[1,5,6,2,7,3,4] => 44
[1,5,6,4,7,3,2] => 56
[1,5,6,7,2,3,4] => 54
[1,5,6,7,4,3,2] => 62
[1,5,7,2,3,4,6] => 38
[1,5,7,6,4,3,2] => 64
[1,6,2,3,4,7,5] => 24
[1,6,2,3,7,4,5] => 30
[1,6,2,7,3,4,5] => 38
[1,6,5,4,3,7,2] => 50
[1,6,5,4,7,3,2] => 58
[1,6,5,7,4,3,2] => 64
[1,6,7,2,3,4,5] => 48
[1,6,7,5,4,3,2] => 68
[1,7,2,3,4,5,6] => 30
[1,7,3,5,6,4,2] => 56
[1,7,3,6,5,4,2] => 58
[1,7,4,3,6,5,2] => 54
[1,7,4,5,3,6,2] => 56
[1,7,4,5,6,3,2] => 62
[1,7,4,6,5,3,2] => 64
[1,7,5,4,3,6,2] => 58
[1,7,5,4,6,3,2] => 64
[1,7,6,4,5,3,2] => 68
[1,7,6,5,4,3,2] => 70
[2,1,3,4,5,6,7] => 2
[2,1,3,4,7,5,6] => 8
[2,1,3,7,4,5,6] => 14
[2,1,6,3,4,5,7] => 14
[2,1,7,3,4,5,6] => 22
[2,1,7,6,5,4,3] => 42
[2,3,1,4,5,6,7] => 6
[2,3,4,1,5,6,7] => 12
[2,3,4,1,5,7,6] => 14
[2,3,4,5,1,6,7] => 20
[2,3,4,5,1,7,6] => 22
[2,3,4,5,6,1,7] => 30
[2,3,4,5,6,7,1] => 42
[2,3,4,5,7,1,6] => 34
[2,3,4,6,1,7,5] => 28
[2,3,4,6,7,1,5] => 40
[2,3,4,7,1,5,6] => 30
[2,3,5,6,7,1,4] => 48
[2,4,1,3,5,6,7] => 10
[2,5,1,3,4,6,7] => 16
[2,5,7,1,3,4,6] => 44
[2,6,1,3,4,5,7] => 24
[2,6,1,7,3,4,5] => 42
[2,6,5,4,3,1,7] => 50
[2,6,7,1,3,4,5] => 54
[2,7,1,3,4,5,6] => 34
[3,1,2,4,5,6,7] => 6
[3,1,2,4,5,7,6] => 8
[3,2,1,4,5,6,7] => 8
[3,2,4,5,6,7,1] => 44
[3,4,1,2,5,6,7] => 16
[3,4,2,5,6,7,1] => 48
[3,4,5,2,6,7,1] => 54
[3,4,5,6,2,7,1] => 62
[3,4,5,6,7,1,2] => 70
[3,5,6,1,2,4,7] => 44
[3,5,6,4,2,1,7] => 56
[3,6,1,2,4,5,7] => 30
[3,6,5,4,2,1,7] => 58
[4,1,2,3,5,6,7] => 12
[4,1,2,3,5,7,6] => 14
[4,1,6,2,3,5,7] => 28
[4,2,3,5,6,7,1] => 48
[4,2,5,1,3,6,7] => 26
[4,3,2,1,5,6,7] => 20
[4,3,2,5,6,7,1] => 50
[4,3,5,2,6,7,1] => 56
[4,3,6,5,2,1,7] => 54
[4,5,1,6,2,3,7] => 44
[4,5,2,3,6,7,1] => 58
[4,5,3,6,2,1,7] => 56
[4,5,6,1,2,3,7] => 54
[4,5,6,3,2,1,7] => 62
[4,6,1,2,3,5,7] => 38
[4,6,1,2,3,7,5] => 42
[4,6,5,3,2,1,7] => 64
[5,1,2,3,4,6,7] => 20
[5,1,2,3,4,7,6] => 22
[5,1,2,3,6,4,7] => 24
[5,1,2,3,6,7,4] => 30
[5,1,2,3,7,4,6] => 28
[5,1,2,6,3,4,7] => 30
[5,1,6,2,3,4,7] => 38
[5,1,6,2,3,7,4] => 44
[5,2,3,4,6,7,1] => 54
[5,2,6,7,1,3,4] => 68
[5,3,2,4,6,7,1] => 56
[5,3,2,6,1,4,7] => 42
[5,4,3,2,1,6,7] => 40
[5,4,3,2,1,7,6] => 42
[5,4,3,2,6,1,7] => 50
[5,4,3,6,2,1,7] => 58
[5,4,6,3,2,1,7] => 64
[5,6,1,2,3,4,7] => 48
[5,6,1,2,3,7,4] => 54
[5,6,3,4,1,2,7] => 64
[5,6,4,3,2,1,7] => 68
[5,6,7,1,2,3,4] => 84
[6,1,2,3,4,5,7] => 30
[6,1,2,3,4,7,5] => 34
[6,1,2,3,7,4,5] => 40
[6,1,2,7,3,4,5] => 48
[6,2,3,4,5,7,1] => 62
[6,2,4,5,3,1,7] => 56
[6,2,5,4,3,1,7] => 58
[6,3,2,5,4,1,7] => 54
[6,3,4,2,5,1,7] => 56
[6,3,4,5,2,1,7] => 62
[6,3,5,4,2,1,7] => 64
[6,4,3,2,5,1,7] => 58
[6,4,3,2,7,1,5] => 66
[6,4,3,5,2,1,7] => 64
[6,4,7,2,5,1,3] => 90
[6,5,3,4,2,1,7] => 68
[6,5,4,3,2,1,7] => 70
[6,7,1,2,3,4,5] => 70
[6,7,4,5,1,2,3] => 100
[7,1,2,3,4,5,6] => 42
[7,2,1,3,4,5,6] => 44
[7,2,3,1,4,5,6] => 48
[7,2,3,4,1,5,6] => 54
[7,2,3,4,5,1,6] => 62
[7,3,1,2,4,5,6] => 48
[7,3,2,1,4,5,6] => 50
[7,3,2,4,1,5,6] => 56
[7,3,4,1,2,5,6] => 58
[7,4,1,2,3,5,6] => 54
[7,4,2,1,3,5,6] => 56
[7,4,5,6,1,2,3] => 96
[7,5,1,2,3,4,6] => 62
[7,5,6,1,2,3,4] => 90
[7,5,6,3,4,1,2] => 106
[7,6,1,2,3,4,5] => 72
[7,6,4,5,1,2,3] => 102
[7,6,5,1,2,3,4] => 92
[7,6,5,3,4,1,2] => 108
[7,6,5,4,1,2,3] => 104
[7,6,5,4,3,1,2] => 110
[7,6,5,4,3,2,1] => 112
[8,7,6,5,4,3,2,1] => 168
[7,6,8,5,4,3,2,1] => 162
[7,8,5,6,4,3,2,1] => 164
[7,8,6,4,5,3,2,1] => 164
[8,6,7,4,5,3,2,1] => 164
[7,6,5,4,8,3,2,1] => 148
[6,5,7,4,8,3,2,1] => 142
[7,8,6,5,3,4,2,1] => 164
[8,6,7,5,3,4,2,1] => 164
[8,7,5,6,3,4,2,1] => 164
[6,7,8,3,4,5,2,1] => 152
[7,8,6,5,4,2,3,1] => 164
[8,6,7,5,4,2,3,1] => 164
[8,7,5,6,4,2,3,1] => 164
[8,7,6,4,5,2,3,1] => 164
[8,6,5,7,3,2,4,1] => 156
[6,7,8,5,2,3,4,1] => 152
[8,5,6,7,2,3,4,1] => 152
[7,8,3,2,4,5,6,1] => 128
[7,6,5,4,3,2,8,1] => 126
[6,5,7,4,3,2,8,1] => 120
[6,5,4,3,7,2,8,1] => 106
[5,4,6,3,7,2,8,1] => 100
[3,4,5,2,6,7,8,1] => 68
[5,2,3,4,6,7,8,1] => 68
[4,3,2,5,6,7,8,1] => 64
[3,4,2,5,6,7,8,1] => 62
[4,2,3,5,6,7,8,1] => 62
[3,2,4,5,6,7,8,1] => 58
[2,3,4,5,6,7,8,1] => 56
[8,7,6,5,4,3,1,2] => 166
[7,8,6,5,4,3,1,2] => 164
[8,6,7,5,4,3,1,2] => 164
[8,7,5,6,4,3,1,2] => 164
[8,7,6,4,5,3,1,2] => 164
[8,7,6,5,3,4,1,2] => 164
[8,7,5,6,3,4,1,2] => 162
[7,8,5,6,3,4,1,2] => 160
[5,6,7,8,3,4,1,2] => 144
[7,8,3,4,5,6,1,2] => 144
[3,4,5,6,7,8,1,2] => 96
[8,7,6,5,4,2,1,3] => 162
[7,6,8,5,4,2,1,3] => 156
[8,7,6,5,4,1,2,3] => 160
[6,7,8,5,4,1,2,3] => 152
[8,5,6,7,4,1,2,3] => 152
[8,7,6,4,5,1,2,3] => 158
[8,6,7,4,5,1,2,3] => 156
[8,7,4,5,6,1,2,3] => 152
[7,8,4,5,6,1,2,3] => 150
[7,6,5,8,3,2,1,4] => 144
[7,5,6,8,2,3,1,4] => 140
[6,7,5,8,3,1,2,4] => 140
[6,5,7,8,2,1,3,4] => 132
[8,7,6,5,1,2,3,4] => 148
[8,7,5,6,1,2,3,4] => 146
[7,8,5,6,1,2,3,4] => 144
[8,5,6,7,1,2,3,4] => 140
[5,6,7,8,1,2,3,4] => 128
[8,7,6,4,3,2,1,5] => 148
[8,7,6,4,2,1,3,5] => 142
[8,7,6,1,2,3,4,5] => 128
[8,6,7,1,2,3,4,5] => 126
[6,7,8,1,2,3,4,5] => 120
[7,8,5,4,2,1,3,6] => 130
[7,8,5,4,1,2,3,6] => 128
[8,7,1,2,3,4,5,6] => 98
[7,8,1,2,3,4,5,6] => 96
[8,6,5,4,3,2,1,7] => 126
[8,6,5,4,3,1,2,7] => 124
[8,5,6,3,4,1,2,7] => 120
[8,6,5,4,2,1,3,7] => 120
[8,6,4,3,2,1,5,7] => 106
[8,6,4,2,1,3,5,7] => 100
[8,2,3,4,1,5,6,7] => 68
[8,4,1,2,3,5,6,7] => 68
[8,3,2,1,4,5,6,7] => 64
[8,2,3,1,4,5,6,7] => 62
[8,3,1,2,4,5,6,7] => 62
[8,2,1,3,4,5,6,7] => 58
[8,1,2,3,4,5,6,7] => 56
[7,6,5,4,3,2,1,8] => 112
[6,7,5,4,3,2,1,8] => 110
[6,5,7,4,3,2,1,8] => 106
[5,6,7,4,3,2,1,8] => 104
[7,6,4,5,3,2,1,8] => 110
[6,5,4,7,3,2,1,8] => 100
[7,5,6,3,4,2,1,8] => 108
[7,6,4,3,5,2,1,8] => 106
[7,6,3,4,5,2,1,8] => 104
[7,5,4,3,6,2,1,8] => 100
[6,7,5,4,2,3,1,8] => 108
[6,5,7,3,2,4,1,8] => 100
[5,6,7,2,3,4,1,8] => 96
[2,3,4,5,6,7,1,8] => 42
[5,6,7,1,2,3,4,8] => 84
[6,7,1,2,3,4,5,8] => 70
[7,1,2,3,4,5,6,8] => 42
[6,5,4,3,2,1,7,8] => 70
[2,3,4,5,6,1,7,8] => 30
[5,6,3,4,1,2,7,8] => 64
[4,5,6,1,2,3,7,8] => 54
[6,1,2,3,4,5,7,8] => 30
[5,4,3,2,1,6,7,8] => 40
[2,3,4,5,1,6,7,8] => 20
[5,1,2,3,4,6,7,8] => 20
[4,3,2,1,5,6,7,8] => 20
[3,4,1,2,5,6,7,8] => 16
[3,2,1,4,5,6,7,8] => 8
[2,1,3,4,5,6,7,8] => 2
[1,2,3,4,5,6,7,8] => 0
[6,5,8,7,4,3,2,1] => 152
[3,5,8,7,6,4,2,1] => 126
[4,3,6,5,8,7,2,1] => 104
[2,6,8,7,5,4,3,1] => 120
[2,3,5,6,8,7,4,1] => 78
[3,2,6,5,4,8,7,1] => 68
[4,3,6,5,7,2,8,1] => 90
[3,2,6,5,7,4,8,1] => 72
[4,3,5,2,7,6,8,1] => 72
[3,2,5,4,7,6,8,1] => 62
[1,8,7,6,5,4,3,2] => 112
[1,7,8,6,5,4,3,2] => 110
[1,6,8,7,5,4,3,2] => 106
[1,7,6,8,5,4,3,2] => 106
[1,6,7,8,5,4,3,2] => 104
[1,5,8,7,6,4,3,2] => 100
[1,7,6,5,8,4,3,2] => 100
[1,3,5,7,8,6,4,2] => 68
[1,4,3,8,7,6,5,2] => 64
[1,6,5,4,3,8,7,2] => 64
[1,4,3,6,5,8,7,2] => 48
[2,1,8,7,6,5,4,3] => 72
[2,1,6,5,7,4,8,3] => 46
[2,1,5,4,7,6,8,3] => 36
[1,2,6,7,8,5,4,3] => 62
[3,2,1,8,7,6,5,4] => 48
[3,2,1,6,5,8,7,4] => 32
[1,2,3,5,6,7,8,4] => 20
[4,3,2,1,8,7,6,5] => 40
[3,4,2,1,7,8,6,5] => 36
[2,4,3,1,6,8,7,5] => 28
[2,4,3,1,7,6,8,5] => 28
[3,2,4,1,6,8,7,5] => 28
[3,2,4,1,7,6,8,5] => 28
[2,3,4,1,6,7,8,5] => 24
[2,1,4,3,8,7,6,5] => 24
[2,1,4,3,6,8,7,5] => 18
[2,1,4,3,7,6,8,5] => 18
[5,4,3,2,1,8,7,6] => 48
[3,2,5,4,1,8,7,6] => 32
[3,2,1,4,5,8,7,6] => 16
[2,3,1,4,5,7,8,6] => 12
[6,5,4,3,2,1,8,7] => 72
[4,3,5,2,6,1,8,7] => 46
[3,2,5,4,6,1,8,7] => 36
[2,3,4,5,6,1,8,7] => 32
[2,1,6,5,4,3,8,7] => 24
[2,1,4,6,5,3,8,7] => 18
[2,1,5,4,6,3,8,7] => 18
[4,3,2,1,6,5,8,7] => 24
[2,4,3,1,6,5,8,7] => 18
[3,2,4,1,6,5,8,7] => 18
[2,1,4,3,6,5,8,7] => 8
[2,1,3,4,5,6,8,7] => 4
[1,2,3,4,5,6,8,7] => 2
[5,7,6,4,3,2,1,8] => 106
[4,7,6,5,3,2,1,8] => 100
[3,2,7,6,5,4,1,8] => 64
[5,4,3,2,7,6,1,8] => 64
[3,2,5,4,7,6,1,8] => 48
[1,4,3,2,7,6,5,8] => 16
[1,3,4,2,6,7,5,8] => 12
[1,3,2,5,4,7,6,8] => 6
[1,2,3,5,4,7,6,8] => 4
[1,3,2,4,5,7,6,8] => 4
[1,2,3,4,5,7,6,8] => 2
[1,2,4,3,6,5,7,8] => 4
[1,3,2,5,4,6,7,8] => 4
[1,2,3,5,4,6,7,8] => 2
[1,3,2,4,5,6,7,8] => 2
[1,8,4,7,6,5,3,2] => 100
[1,8,5,4,7,6,3,2] => 96
[1,8,7,4,5,6,3,2] => 104
[1,8,7,4,6,5,3,2] => 106
[1,8,6,5,4,7,3,2] => 100
[1,8,7,5,4,6,3,2] => 106
[1,8,7,5,6,4,3,2] => 110
[2,1,4,5,8,6,7,3] => 38
[2,1,8,5,4,7,6,3] => 56
[2,3,4,8,5,6,7,1] => 68
[2,3,6,4,5,1,8,7] => 38
[2,3,7,4,5,6,8,1] => 68
[2,8,4,3,5,7,6,1] => 90
[4,2,3,1,8,6,7,5] => 36
[8,2,7,4,6,5,3,1] => 132
[4,3,2,7,5,6,8,1] => 70
[4,3,2,8,5,7,6,1] => 78
[6,3,2,5,4,1,8,7] => 56
[8,3,2,5,4,7,6,1] => 104
[8,3,2,7,6,5,4,1] => 120
[8,3,7,4,6,5,2,1] => 142
[7,3,6,5,4,2,1,8] => 100
[7,4,3,6,5,2,1,8] => 96
[7,6,3,5,4,2,1,8] => 106
[8,5,4,3,2,7,6,1] => 120
[8,7,4,3,6,5,2,1] => 152
[2,4,6,8,1,3,5,7] => 60
[2,4,6,1,7,3,8,5] => 46
[2,1,4,3,7,5,8,6] => 14
[2,4,1,3,7,5,8,6] => 20
[2,1,4,3,7,8,5,6] => 20
[2,4,7,8,1,3,5,6] => 70
[2,1,4,3,8,5,6,7] => 16
[2,4,5,6,7,1,8,3] => 68
[2,1,5,3,6,4,8,7] => 14
[2,1,5,6,3,4,8,7] => 20
[2,5,6,8,1,3,4,7] => 70
[2,1,5,3,7,4,8,6] => 20
[2,5,1,7,3,4,8,6] => 36
[2,1,5,7,3,8,4,6] => 36
[2,5,7,8,1,3,4,6] => 80
[2,3,5,6,1,7,8,4] => 44
[2,1,6,3,7,4,8,5] => 30
[2,6,7,1,3,4,8,5] => 60
[2,1,6,7,8,3,4,5] => 56
[2,6,7,8,1,3,4,5] => 92
[2,1,6,3,4,7,8,5] => 24
[2,1,6,3,4,5,8,7] => 16
[2,6,1,3,4,5,7,8] => 24
[2,7,8,1,3,4,5,6] => 76
[2,7,1,3,4,5,6,8] => 34
[2,3,4,5,7,8,1,6] => 52
[2,1,8,3,4,5,6,7] => 32
[2,8,1,3,4,5,6,7] => 46
[2,1,3,8,4,5,6,7] => 22
[2,3,4,5,6,8,1,7] => 46
[3,1,4,2,6,5,8,7] => 14
[3,4,1,2,6,5,8,7] => 20
[3,1,4,2,6,8,5,7] => 20
[3,4,6,8,1,2,5,7] => 70
[3,1,4,2,7,5,8,6] => 20
[3,4,1,2,7,8,5,6] => 32
[3,4,7,8,1,2,5,6] => 80
[3,1,5,2,6,4,8,7] => 20
[3,5,1,6,2,4,8,7] => 36
[3,1,5,6,2,8,4,7] => 36
[3,5,6,8,1,2,4,7] => 80
[3,1,5,2,7,4,8,6] => 26
[3,5,1,7,2,8,4,6] => 52
[3,5,7,8,1,2,4,6] => 90
[1,3,2,5,4,8,6,7] => 10
[1,3,5,8,2,4,6,7] => 36
[1,3,5,6,2,7,4,8] => 28
[3,1,6,2,7,4,8,5] => 36
[3,6,7,1,2,8,4,5] => 76
[3,6,1,7,8,2,4,5] => 76
[3,6,7,8,1,2,4,5] => 102
[1,3,2,6,4,7,5,8] => 12
[3,1,2,6,7,4,8,5] => 28
[1,3,2,6,4,8,5,7] => 16
[1,3,2,6,4,5,7,8] => 8
[1,3,2,7,4,8,5,6] => 24
[1,3,2,7,4,5,6,8] => 14
[1,3,2,8,4,5,6,7] => 22
[3,1,2,4,5,8,6,7] => 12
[1,3,2,4,5,8,6,7] => 8
[4,1,5,2,6,3,8,7] => 30
[4,5,6,1,2,3,8,7] => 56
[4,1,5,6,8,2,3,7] => 60
[4,5,6,8,1,2,3,7] => 92
[4,1,5,2,7,3,8,6] => 36
[4,1,5,2,7,8,3,6] => 46
[4,5,7,1,2,8,3,6] => 76
[4,5,1,7,8,2,3,6] => 76
[4,5,7,8,1,2,3,6] => 102
[1,4,2,5,3,7,6,8] => 12
[1,4,2,5,3,8,6,7] => 16
[1,4,2,5,3,6,7,8] => 10
[1,4,5,6,7,2,3,8] => 48
[4,1,6,2,7,3,8,5] => 46
[4,6,7,1,8,2,3,5] => 100
[4,6,7,8,1,2,3,5] => 114
[1,4,2,6,3,7,5,8] => 18
[1,4,2,6,7,8,3,5] => 42
[1,4,2,6,3,8,5,7] => 22
[4,1,2,3,6,5,8,7] => 16
[1,4,2,6,3,5,7,8] => 14
[1,4,2,7,3,8,5,6] => 30
[4,7,1,2,3,5,6,8] => 48
[1,4,2,7,3,5,6,8] => 20
[1,4,2,3,7,5,6,8] => 12
[1,4,2,3,5,7,6,8] => 8
[1,4,2,8,3,5,6,7] => 28
[4,1,2,3,8,5,6,7] => 24
[1,4,2,3,5,8,6,7] => 12
[1,4,2,3,5,6,7,8] => 6
[5,1,6,2,7,3,8,4] => 60
[1,5,2,6,3,7,4,8] => 28
[1,5,2,6,3,8,4,7] => 32
[1,5,2,6,3,4,7,8] => 22
[1,2,5,6,3,4,7,8] => 16
[1,5,2,7,3,8,4,6] => 40
[5,7,1,2,3,4,6,8] => 58
[1,5,2,7,3,4,6,8] => 28
[1,5,2,3,4,7,6,8] => 14
[5,1,2,8,3,4,6,7] => 44
[1,5,2,8,3,4,6,7] => 36
[1,5,8,2,3,4,6,7] => 48
[1,5,2,3,4,8,6,7] => 18
[1,2,3,5,4,8,6,7] => 8
[5,1,2,3,4,6,8,7] => 22
[1,5,2,3,4,6,7,8] => 12
[1,6,2,7,3,8,4,5] => 52
[1,6,7,8,2,3,4,5] => 84
[6,7,1,2,3,4,8,5] => 76
[6,1,7,2,3,4,5,8] => 58
[6,1,2,7,3,4,5,8] => 48
[1,6,2,7,3,4,5,8] => 38
[1,6,7,2,3,4,5,8] => 48
[1,6,2,3,4,7,5,8] => 24
[1,2,3,6,4,7,5,8] => 10
[6,1,8,2,3,4,5,7] => 68
[1,6,2,8,3,4,5,7] => 46
[1,6,8,2,3,4,5,7] => 58
[1,6,2,3,4,8,5,7] => 28
[1,2,3,6,4,8,5,7] => 14
[6,1,2,3,4,5,8,7] => 32
[1,6,2,3,4,5,7,8] => 20
[1,2,3,6,4,5,7,8] => 6
[1,7,2,8,3,4,5,6] => 58
[1,7,8,2,3,4,5,6] => 70
[1,7,2,3,8,4,5,6] => 48
[7,1,2,3,4,8,5,6] => 52
[1,7,2,3,4,8,5,6] => 40
[1,2,3,7,4,8,5,6] => 22
[7,1,2,3,4,5,8,6] => 46
[1,7,2,3,4,5,8,6] => 34
[1,2,7,3,4,5,8,6] => 24
[1,7,2,3,4,5,6,8] => 30
[1,2,3,7,4,5,6,8] => 12
[1,8,2,3,4,5,6,7] => 42
[1,2,3,8,4,5,6,7] => 20
[1,2,3,4,5,8,6,7] => 6
[5,3,2,6,1,4,8,7] => 44
[7,3,2,5,4,8,1,6] => 84
[8,4,5,2,3,7,6,1] => 116
[7,4,5,2,3,8,1,6] => 96
[6,4,5,2,3,1,8,7] => 68
[5,4,6,2,1,3,8,7] => 60
[3,6,1,5,4,2,8,7] => 44
[4,6,5,1,3,2,8,7] => 60
[5,6,4,3,1,2,8,7] => 68
[7,5,4,3,2,8,1,6] => 100
[8,6,4,3,7,2,5,1] => 140
[7,6,4,3,8,2,1,5] => 124
[6,7,4,3,8,1,2,5] => 120
[5,7,4,3,1,8,2,6] => 92
[4,7,5,1,3,8,2,6] => 84
[3,7,1,5,4,8,2,6] => 68
[2,1,7,5,4,8,3,6] => 44
[3,8,1,5,4,7,6,2] => 84
[4,8,5,1,3,7,6,2] => 100
[5,8,4,3,1,7,6,2] => 108
[6,8,4,3,7,1,5,2] => 132
[7,8,4,3,6,5,1,2] => 148
[6,8,5,7,3,1,4,2] => 148
[5,8,6,7,1,3,4,2] => 140
[4,8,6,1,7,3,5,2] => 116
[3,8,1,6,7,4,5,2] => 96
[2,1,8,6,7,4,5,3] => 68
[2,1,7,6,8,4,3,5] => 60
[3,7,1,6,8,4,2,5] => 84
[4,7,6,1,8,3,2,5] => 104
[5,7,6,8,1,3,2,4] => 132
[5,4,7,2,1,8,3,6] => 80
[6,4,7,2,8,1,3,5] => 108
[7,4,6,2,8,3,1,5] => 116
[8,4,6,2,7,3,5,1] => 132
[8,3,2,6,7,4,5,1] => 116
[7,3,2,6,8,4,1,5] => 100
[6,3,2,7,8,1,4,5] => 88
[5,3,2,7,1,8,4,6] => 60
[4,3,2,1,7,8,5,6] => 36
[3,4,1,2,8,7,6,5] => 36
[5,3,2,8,1,7,6,4] => 68
[6,3,2,8,7,1,5,4] => 92
[7,3,2,8,6,5,1,4] => 108
[8,4,7,2,6,5,3,1] => 140
[7,4,8,2,6,5,1,3] => 132
[6,4,8,2,7,1,5,3] => 116
[5,4,8,2,1,7,6,3] => 92
[4,5,8,1,2,7,6,3] => 88
[3,5,1,8,2,7,6,4] => 60
[2,1,5,8,3,7,6,4] => 44
[2,1,6,8,7,3,5,4] => 60
[3,6,1,8,7,2,5,4] => 80
[4,6,8,1,7,2,5,3] => 108
[5,6,8,7,1,2,4,3] => 132
[6,5,8,7,2,1,4,3] => 136
[7,5,8,6,2,4,1,3] => 148
[8,5,7,6,2,4,3,1] => 156
[5,7,8,6,1,4,2,3] => 140
[4,7,8,1,6,5,2,3] => 120
[3,7,1,8,6,5,2,4] => 92
[2,1,7,8,6,5,3,4] => 68
[3,8,1,7,6,5,4,2] => 100
[4,8,7,1,6,5,3,2] => 124
[5,8,7,6,1,4,3,2] => 144
[6,8,7,5,4,1,3,2] => 156
[4,2,5,1,3,6,7,8] => 26
[5,2,6,7,1,3,4,8] => 68
[3,2,7,8,1,4,5,6] => 64
[5,3,2,6,1,4,7,8] => 42
[7,4,3,8,1,2,5,6] => 96
[4,7,3,6,8,1,2,5] => 106
[6,7,3,4,8,1,2,5] => 118
[5,4,2,7,8,1,3,6] => 84
[6,4,7,2,5,1,3,8] => 90
[6,4,3,2,7,1,5,8] => 66
[5,4,3,2,8,1,6,7] => 60
[7,5,3,8,2,6,1,4] => 122
[8,5,4,7,2,6,1,3] => 138
[8,5,4,7,3,6,1,2] => 144
[7,5,3,1,8,6,4,2] => 108
[8,7,1,3,6,2,4,5] => 114
[5,4,1,3,8,2,6,7] => 52
[4,8,5,7,1,6,2,3] => 124
[8,7,6,5,1,4,2,3] => 154
[3,2,1,5,8,4,6,7] => 24
[1,8,2,7,3,6,4,5] => 68
[2,5,3,4,1,8,6,7] => 32
[2,4,8,3,5,7,6,1] => 82
[8,7,2,6,3,5,4,1] => 142
[5,4,3,2,1,8,6,7] => 46
[3,8,4,7,6,5,2,1] => 126
[3,6,7,4,5,8,1,2] => 112
[7,8,1,4,5,2,3,6] => 112
[1,6,7,4,5,2,3,8] => 64
[8,5,7,4,2,1,6,3] => 134
[8,6,3,5,2,4,1,7] => 116
[8,3,7,5,2,4,6,1] => 130
[8,7,6,3,5,2,4,1] => 158
[8,5,7,4,3,2,6,1] => 144
[8,4,7,6,3,5,2,1] => 152
[6,5,8,4,2,7,3,1] => 134
[7,5,3,6,4,2,8,1] => 116
[8,5,3,6,2,7,4,1] => 130
[8,6,4,7,5,3,2,1] => 158
[8,6,5,4,2,7,3,1] => 144
[8,7,5,2,6,4,3,1] => 152
[2,1,8,7,4,3,6,5] => 56
[6,5,2,1,4,3,8,7] => 56
[8,5,2,7,4,1,6,3] => 120
[8,7,2,1,4,5,6,3] => 112
[8,7,2,3,4,1,6,5] => 112
[8,1,6,3,2,5,4,7] => 80
[1,2,3,8,4,7,5,6] => 26
[1,8,2,3,4,7,5,6] => 48
[1,6,2,5,3,4,7,8] => 26
[1,8,2,5,3,4,6,7] => 48
[1,8,2,7,3,4,5,6] => 62
[8,7,2,1,4,3,6,5] => 104
[8,2,1,5,4,3,7,6] => 68
[8,7,6,5,2,1,4,3] => 152
[8,7,6,3,2,5,4,1] => 152
[8,5,4,7,6,3,2,1] => 152
[5,4,3,8,7,6,1,2] => 112
[8,1,2,4,5,6,3,7] => 68
[1,8,2,6,3,5,4,7] => 56
[1,7,2,6,3,5,4,8] => 44
[1,7,2,6,3,4,5,8] => 42
[8,7,6,1,4,3,2,5] => 136
[7,1,8,6,5,4,3,2] => 122
[1,8,7,6,5,4,2,3] => 110
[3,2,1,4,8,5,6,7] => 20
[1,8,2,3,4,6,5,7] => 44
[1,6,2,7,3,5,4,8] => 40
[1,6,2,5,3,7,4,8] => 32
[1,5,3,7,2,6,4,8] => 36
[2,8,4,1,6,3,7,5] => 66
[5,3,6,4,7,1,8,2] => 92
[8,1,6,7,5,4,3,2] => 124
[8,1,6,7,4,5,2,3] => 120
[1,8,2,7,3,5,4,6] => 64
[1,7,2,8,3,5,4,6] => 60
[5,4,3,2,7,1,8,6] => 58
[3,5,2,7,1,8,6,4] => 60
[2,6,7,3,1,4,8,5] => 64
[5,4,1,8,7,2,3,6] => 80
[8,4,3,1,7,6,2,5] => 100
[5,7,4,3,2,1,8,6] => 82
[3,2,6,1,4,7,8,5] => 34
[3,6,7,2,1,8,5,4] => 80
[1,7,6,5,4,8,2,3] => 90
[1,5,4,2,8,3,6,7] => 34
[6,7,2,3,4,8,5,1] => 110
[4,6,2,5,8,3,7,1] => 94
[4,3,5,2,7,1,8,6] => 52
[3,2,6,1,7,4,8,5] => 40
[1,7,2,5,3,4,6,8] => 36
[1,6,2,4,3,5,7,8] => 22
[1,5,2,4,3,6,7,8] => 14
[1,6,2,4,3,7,5,8] => 26
[8,1,2,5,6,7,4,3] => 88
[7,8,3,2,1,6,5,4] => 112
[1,2,3,8,4,6,5,7] => 22
[8,7,1,6,4,5,3,2] => 136
[8,7,6,1,5,3,4,2] => 146
[4,8,7,5,6,3,2,1] => 146
[4,3,7,6,2,1,8,5] => 74
[4,7,6,3,2,8,1,5] => 102
[7,1,6,5,8,3,2,4] => 106
[7,1,6,5,4,8,2,3] => 102
[5,1,7,3,8,4,6,2] => 84
[4,3,6,2,7,1,8,5] => 62
[8,7,5,4,1,3,2,6] => 132
[6,4,3,8,2,1,5,7] => 84
[5,3,8,7,6,4,2,1] => 130
[8,4,7,6,5,1,3,2] => 150
[2,3,8,7,4,5,6,1] => 88
[7,6,5,3,2,1,8,4] => 108
[1,7,2,8,3,6,4,5] => 64
[1,5,2,8,3,7,4,6] => 44
[3,2,4,1,7,5,8,6] => 24
[4,3,6,1,7,2,8,5] => 58
[3,7,5,6,8,4,2,1] => 124
[5,4,6,3,7,1,8,2] => 96
[1,2,8,7,4,5,6,3] => 62
[2,8,6,3,7,4,5,1] => 108
[5,4,6,1,7,3,8,2] => 88
[1,8,2,6,3,4,5,7] => 54
[6,3,8,4,2,5,7,1] => 110
[8,7,1,6,2,5,4,3] => 126
[8,2,7,6,3,5,4,1] => 132
[1,2,3,7,4,6,5,8] => 14
[4,5,2,3,8,1,6,7] => 56
[8,1,7,6,5,4,2,3] => 124
[1,8,6,7,5,4,3,2] => 110
[6,2,8,7,5,4,3,1] => 128
[7,1,3,5,8,2,4,6] => 76
[4,6,2,7,3,5,1,8] => 76
[1,5,7,3,8,4,6,2] => 76
[8,1,7,6,5,2,4,3] => 120
[1,3,2,8,4,7,5,6] => 28
[5,2,3,8,1,6,7,4] => 64
[1,8,2,4,3,5,6,7] => 44
[2,4,1,8,7,6,5,3] => 58
[1,8,5,4,3,2,6,7] => 62
[8,2,6,1,7,3,5,4] => 100
[7,1,8,6,5,3,2,4] => 116
[1,7,2,5,3,6,4,8] => 40
[1,8,2,6,3,7,4,5] => 64
[5,1,2,4,8,3,6,7] => 38
[1,6,2,8,3,7,4,5] => 56
[2,8,7,6,5,3,4,1] => 124
[2,1,8,4,7,5,6,3] => 58
[5,7,3,8,4,6,2,1] => 132
[8,7,3,5,1,6,2,4] => 132
[6,4,8,1,7,2,3,5] => 108
[6,1,7,2,8,5,4,3] => 90
[7,1,2,8,3,5,4,6] => 72
[1,6,2,5,8,3,4,7] => 46
[8,1,7,5,6,4,3,2] => 124
[1,7,2,8,4,5,3,6] => 64
[1,7,3,4,2,5,8,6] => 40
[8,2,5,1,3,6,4,7] => 76
[7,1,2,8,5,3,4,6] => 76
[5,2,6,3,7,4,8,1] => 84
[1,6,2,8,3,5,4,7] => 48
[8,1,5,3,2,4,6,7] => 70
[7,8,5,6,2,1,4,3] => 148
[7,8,4,2,6,1,5,3] => 132
[8,6,1,3,4,2,5,7] => 92
[8,3,1,5,6,2,4,7] => 82
[6,5,8,7,3,4,1,2] => 148
[6,4,8,3,7,5,1,2] => 132
[3,6,4,5,7,2,8,1] => 92
[5,2,4,7,3,6,8,1] => 80
[4,2,5,1,6,3,8,7] => 34
[5,4,3,6,1,2,8,7] => 58
[4,5,2,3,7,6,1,8] => 60
[4,1,2,6,5,8,7,3] => 44
[5,1,6,2,4,8,7,3] => 60
[7,6,2,1,8,5,4,3] => 106
[2,7,6,8,5,4,1,3] => 116
[8,7,1,6,5,3,2,4] => 132
[2,8,1,3,4,5,7,6] => 48
[3,1,8,2,4,7,6,5] => 46
[5,4,8,1,7,2,6,3] => 100
[5,4,6,2,7,1,8,3] => 88
[1,7,6,8,5,4,2,3] => 104
[6,8,5,4,2,1,3,7] => 116
[1,7,2,6,3,8,4,5] => 56
[8,5,7,3,2,1,6,4] => 126
[4,2,5,3,7,6,8,1] => 68
[3,2,6,4,7,5,8,1] => 68
[4,2,6,3,7,5,8,1] => 74
[2,7,6,5,3,4,8,1] => 94
[5,8,6,7,4,3,2,1] => 154
[4,2,5,1,7,6,8,3] => 52
[4,2,6,1,7,3,8,5] => 50
[4,3,1,2,8,7,5,6] => 36
[4,1,5,2,7,6,8,3] => 48
[4,1,6,2,7,5,8,3] => 54
[1,7,2,4,3,5,6,8] => 32
[6,2,8,4,5,1,7,3] => 100
[8,1,4,2,6,3,5,7] => 70
[4,3,5,1,6,2,8,7] => 42
[3,1,5,4,7,6,8,2] => 50
[4,1,5,3,7,6,8,2] => 56
[4,1,6,3,7,5,8,2] => 62
[8,3,6,1,4,7,2,5] => 104
[1,7,2,3,4,6,5,8] => 32
[6,3,7,1,4,8,2,5] => 90
[2,1,7,5,6,8,3,4] => 56
[2,1,5,3,8,7,6,4] => 34
[1,6,7,8,3,4,5,2] => 96
[1,8,4,2,5,3,6,7] => 52
[3,1,6,5,4,2,8,7] => 34
[5,6,1,2,3,8,7,4] => 64
[1,3,2,7,4,6,5,8] => 16
[1,2,7,6,8,3,4,5] => 56
[8,7,1,5,6,4,3,2] => 136
[3,8,7,6,4,5,2,1] => 136
[4,8,2,3,5,1,6,7] => 74
[5,1,6,4,7,3,8,2] => 76
[6,1,8,7,2,5,4,3] => 104
[1,8,2,5,3,7,4,6] => 56
[2,6,8,4,3,7,5,1] => 100
[4,2,6,8,7,3,5,1] => 100
[8,5,1,3,7,2,6,4] => 100
[8,3,1,2,4,7,5,6] => 68
[1,8,2,4,3,7,5,6] => 50
[1,8,2,4,3,6,5,7] => 46
[4,7,2,5,8,3,6,1] => 104
[5,4,6,2,7,3,8,1] => 96
[6,1,8,3,2,5,4,7] => 72
[1,7,2,5,3,8,4,6] => 48
[8,4,1,5,7,2,6,3] => 104
[8,7,6,3,5,1,4,2] => 154
[3,4,8,5,6,7,2,1] => 110
[2,7,8,4,5,3,6,1] => 110
[3,1,6,5,7,4,8,2] => 60
[4,1,2,8,7,6,5,3] => 60
[5,8,1,2,7,6,3,4] => 96
[5,3,1,8,2,7,4,6] => 60
[4,1,2,3,6,8,7,5] => 26
[7,5,1,3,8,2,6,4] => 92
[3,6,8,5,7,2,4,1] => 124
[8,2,1,7,3,5,6,4] => 84
[2,8,4,1,6,7,5,3] => 78
[3,6,8,7,1,5,4,2] => 116
[8,3,6,7,2,1,5,4] => 122
[4,6,8,2,1,7,5,3] => 100
[3,7,6,8,4,5,2,1] => 130
[2,7,6,8,5,3,4,1] => 118
[2,4,8,6,7,3,5,1] => 100
[6,8,2,4,3,5,1,7] => 104
[7,5,2,8,3,4,6,1] => 120
[5,6,2,8,4,3,1,7] => 96
[5,7,8,6,3,4,1,2] => 150
[4,1,6,5,7,3,8,2] => 70
[3,2,5,1,7,6,8,4] => 38
[3,2,6,1,7,5,8,4] => 44
[4,2,6,1,7,5,8,3] => 58
[5,1,8,2,7,6,4,3] => 84
[6,4,3,1,2,8,7,5] => 60
[7,4,3,1,8,2,6,5] => 84
[3,2,8,1,7,6,4,5] => 60
[3,2,8,7,1,5,4,6] => 68
[4,8,2,7,1,5,3,6] => 92
[1,4,2,8,3,7,5,6] => 34
[1,6,2,4,3,8,5,7] => 30
[6,3,8,2,1,7,5,4] => 92
[7,5,1,3,8,4,2,6] => 92
[8,1,6,2,7,4,5,3] => 100
[6,8,1,7,2,5,3,4] => 116
[4,2,1,3,8,5,7,6] => 28
[3,2,5,1,6,4,8,7] => 24
[5,8,7,2,1,4,3,6] => 112
[3,2,8,6,5,1,4,7] => 68
[6,1,5,8,7,4,2,3] => 104
[3,8,6,7,1,5,2,4] => 116
[3,2,6,1,4,8,7,5] => 36
[5,7,2,8,4,3,6,1] => 118
[3,7,4,1,8,5,2,6] => 78
[5,2,6,1,7,3,8,4] => 64
[7,8,1,3,2,5,4,6] => 100
[6,1,2,8,4,3,5,7] => 58
[3,2,5,1,7,4,8,6] => 30
[5,4,6,1,7,2,8,3] => 84
[1,6,8,5,3,7,4,2] => 92
[8,6,1,7,4,2,5,3] => 124
[3,2,8,5,7,4,6,1] => 88
[3,6,5,8,7,4,1,2] => 120
[4,3,6,1,5,8,2,7] => 58
[1,3,6,7,5,8,2,4] => 64
[3,8,1,5,2,4,6,7] => 60
[3,7,8,1,5,2,4,6] => 92
[1,2,7,5,8,3,4,6] => 48
[6,7,1,4,2,8,3,5] => 92
[1,6,7,2,8,4,3,5] => 74
[5,4,2,8,7,1,6,3] => 92
[4,7,2,1,3,5,8,6] => 54
[5,2,7,1,3,8,4,6] => 62
[5,3,1,7,8,2,4,6] => 68
[4,3,5,2,1,8,6,7] => 40
[5,6,2,1,4,8,3,7] => 64
[4,1,3,2,8,5,6,7] => 26
[2,6,1,4,5,8,3,7] => 42
[2,1,7,6,5,8,3,4] => 58
[5,7,3,6,1,8,2,4] => 106
[6,4,3,5,8,1,7,2] => 100
[2,7,6,4,5,8,1,3] => 100
[7,3,5,4,8,6,1,2] => 122
[3,2,5,4,8,1,6,7] => 44
[3,2,6,7,4,5,1,8] => 60
[3,2,6,8,4,1,5,7] => 60
[4,6,2,8,3,1,5,7] => 76
[4,7,2,8,1,3,5,6] => 84
[5,6,8,2,3,1,4,7] => 100
[5,7,8,2,1,3,4,6] => 108
[1,4,3,7,8,5,6,2] => 60
[1,5,6,3,4,8,7,2] => 60
[4,1,2,7,8,5,6,3] => 56
[5,1,7,2,8,4,6,3] => 76
[6,1,7,8,2,4,5,3] => 100
[5,7,1,2,8,3,6,4] => 84
[6,7,1,8,2,3,5,4] => 108
[1,8,6,5,3,7,4,2] => 96
[5,8,7,3,2,6,1,4] => 130
[2,5,3,7,1,6,8,4] => 52
[2,6,1,3,5,4,8,7] => 28
[1,5,2,4,3,7,6,8] => 16
[1,3,2,8,4,6,5,7] => 24
[1,7,2,4,3,6,5,8] => 34
[2,8,3,1,5,4,6,7] => 52
[2,5,3,4,7,1,8,6] => 44
[4,2,5,3,7,1,8,6] => 48
[4,2,5,3,1,8,6,7] => 36
[4,2,1,8,5,3,6,7] => 40
[5,1,4,8,3,2,6,7] => 56
[1,5,8,4,3,2,6,7] => 56
[4,3,6,2,8,7,5,1] => 86
[6,4,3,1,7,2,8,5] => 68
[1,7,4,3,8,5,2,6] => 66
[1,5,7,3,8,4,2,6] => 68
[5,1,4,7,8,3,2,6] => 74
[5,4,7,1,3,8,2,6] => 82
[4,8,1,5,7,3,6,2] => 100
[8,1,5,3,7,4,6,2] => 100
[1,4,3,8,7,5,6,2] => 62
[4,3,1,8,6,7,5,2] => 72
[4,3,7,1,8,6,5,2] => 84
[6,8,1,7,4,3,5,2] => 124
[6,4,8,1,7,3,5,2] => 116
[6,4,8,7,1,5,2,3] => 130
[7,6,4,1,3,8,2,5] => 104
[7,6,1,4,8,3,2,5] => 108
[7,1,6,8,4,3,2,5] => 106
[1,7,5,6,3,2,8,4] => 70
[6,1,7,5,3,2,8,4] => 80
[6,5,3,2,8,7,4,1] => 106
[5,2,6,3,8,7,4,1] => 94
[5,2,7,6,3,1,8,4] => 82
[6,5,2,1,7,3,8,4] => 74
[4,2,1,7,8,5,3,6] => 52
[2,7,4,6,3,1,8,5] => 70
[6,2,4,8,3,7,5,1] => 100
[7,2,6,3,4,1,8,5] => 82
[2,7,1,8,3,5,4,6] => 64
[2,1,7,3,5,8,4,6] => 36
[8,1,2,7,6,3,4,5] => 88
[7,8,2,6,3,1,5,4] => 126
[2,7,8,4,1,6,5,3] => 96
[2,8,1,7,5,6,3,4] => 82
[8,3,7,1,5,6,2,4] => 116
[8,6,1,2,7,5,3,4] => 110
[1,8,5,2,6,7,4,3] => 80
[5,2,1,8,6,7,4,3] => 72
[5,2,7,1,8,6,4,3] => 84
[2,8,5,7,6,4,3,1] => 120
[1,7,8,5,2,6,4,3] => 94
[7,8,1,6,4,2,5,3] => 126
[7,8,6,1,5,3,2,4] => 140
[7,3,8,6,1,5,2,4] => 124
[2,7,6,8,1,4,3,5] => 96
[8,2,5,7,6,4,3,1] => 132
[6,5,8,7,1,2,3,4] => 132
[4,1,5,3,7,2,8,6] => 40
[7,5,8,4,3,6,2,1] => 148
[4,7,3,2,1,5,8,6] => 60
[5,6,7,8,2,1,4,3] => 132
[8,5,6,7,1,3,2,4] => 142
[5,8,6,2,4,1,3,7] => 108
[5,1,6,2,7,4,8,3] => 64
[8,3,5,2,1,6,4,7] => 84
[5,7,3,8,1,4,6,2] => 114
[6,8,1,4,7,2,5,3] => 114
[3,2,1,7,8,5,6,4] => 44
[4,7,3,5,8,6,2,1] => 118
[4,3,6,5,7,1,8,2] => 86
[8,4,2,1,7,3,6,5] => 86
[3,7,5,1,4,2,8,6] => 64
[1,8,6,3,7,5,2,4] => 92
[6,2,8,1,3,4,7,5] => 76
[4,8,2,1,7,6,3,5] => 84
[2,7,4,8,1,6,5,3] => 88
[3,8,2,1,4,6,5,7] => 56
[1,4,2,8,3,6,5,7] => 30
[4,7,2,8,1,5,3,6] => 88
[5,2,1,8,3,4,7,6] => 48
[4,1,3,2,8,6,5,7] => 28
[3,1,6,7,5,8,2,4] => 68
[2,4,5,7,3,1,8,6] => 52
[4,6,8,3,2,7,5,1] => 114
[1,4,6,7,3,2,8,5] => 52
[1,7,4,8,6,3,5,2] => 92
[3,7,6,5,8,2,1,4] => 116
[2,3,5,7,6,8,1,4] => 72
[2,1,6,5,7,8,3,4] => 52
[2,1,7,8,5,6,4,3] => 68
[2,5,4,7,6,1,8,3] => 72
[3,2,5,6,1,8,7,4] => 48
[6,3,1,5,2,4,8,7] => 46
[1,3,7,4,6,8,2,5] => 56
[8,1,6,5,7,2,4,3] => 114
[7,8,1,6,2,4,5,3] => 122
[1,7,2,8,5,3,4,6] => 64
[7,6,1,8,4,3,2,5] => 116
[8,1,2,7,3,4,6,5] => 78
[1,3,8,7,5,6,2,4] => 76
[1,2,8,7,6,3,4,5] => 62
[6,3,7,5,2,8,4,1] => 114
[8,5,7,3,1,4,2,6] => 124
[2,5,7,3,8,6,4,1] => 94
[2,8,6,3,1,5,7,4] => 80
[4,8,1,2,7,6,3,5] => 82
[4,1,2,8,7,5,6,3] => 58
[8,4,2,1,7,5,3,6] => 88
[8,3,4,1,6,7,2,5] => 96
[3,1,4,8,6,5,7,2] => 60
[3,4,8,1,7,2,5,6] => 70
[2,3,8,1,4,6,7,5] => 46
[4,3,6,2,7,5,8,1] => 78
[5,3,6,4,7,2,8,1] => 96
[5,3,6,1,7,4,8,2] => 80
[5,3,6,1,7,2,8,4] => 72
[5,3,6,2,7,1,8,4] => 76
[5,3,6,2,7,4,8,1] => 88
[5,2,6,3,7,1,8,4] => 72
[5,2,6,4,7,1,8,3] => 80
[1,7,5,4,8,3,6,2] => 84
[8,1,5,4,7,6,2,3] => 108
[1,8,6,7,4,5,3,2] => 108
[7,1,6,8,4,2,5,3] => 108
[7,8,6,1,4,2,3,5] => 132
[1,7,6,8,4,3,5,2] => 100
[8,6,7,1,3,4,2,5] => 132
[7,6,8,1,3,2,4,5] => 124
[7,5,8,3,1,2,4,6] => 116
[8,6,1,7,3,5,2,4] => 124
[1,7,8,6,5,3,4,2] => 108
[7,8,1,6,5,2,3,4] => 128
[6,4,3,7,2,5,1,8] => 84
[8,4,3,6,5,1,2,7] => 108
[6,5,8,3,2,1,4,7] => 104
[1,8,2,5,3,6,4,7] => 52
[1,5,2,8,3,6,4,7] => 40
[6,7,8,1,4,3,2,5] => 128
[6,7,8,5,1,3,2,4] => 142
[5,7,6,8,2,3,4,1] => 142
[6,7,8,2,4,3,5,1] => 142
[7,8,2,1,3,4,6,5] => 100
[1,5,2,4,3,8,6,7] => 20
[3,2,7,1,8,4,6,5] => 52
[7,8,4,1,6,2,3,5] => 124
[6,1,8,4,5,2,3,7] => 84
[1,6,7,3,2,5,4,8] => 52
[7,8,3,1,2,6,4,5] => 108
[7,8,2,4,5,1,6,3] => 124
[7,8,2,3,1,5,6,4] => 108
[6,2,8,3,1,5,7,4] => 84
[6,3,8,4,5,7,1,2] => 124
[2,6,7,4,5,1,8,3] => 84
[2,6,7,3,1,5,8,4] => 68
[3,5,4,7,6,8,1,2] => 100
[5,3,4,8,6,7,1,2] => 108
[5,2,4,8,6,1,7,3] => 84
[6,3,8,1,2,7,4,5] => 88
[5,1,3,8,2,6,4,7] => 52
[1,5,4,7,6,2,3,8] => 52
[5,1,4,8,6,2,3,7] => 68
[4,6,7,2,8,1,5,3] => 108
[4,6,7,3,8,5,1,2] => 124
[4,5,3,7,8,6,1,2] => 108
[4,5,2,7,8,1,6,3] => 88
[4,2,5,6,8,1,7,3] => 76
[4,3,5,6,8,7,1,2] => 100
[3,7,5,2,4,1,8,6] => 68
[8,2,4,5,7,3,6,1] => 114
[8,2,4,6,5,3,1,7] => 100
[8,2,5,4,6,1,3,7] => 96
[8,6,3,5,1,4,2,7] => 112
[8,6,1,4,5,3,2,7] => 104
[8,1,5,6,4,3,2,7] => 94
[5,4,7,3,1,8,2,6] => 86
[1,7,4,5,3,2,8,6] => 52
[5,7,4,2,1,3,8,6] => 76
[8,3,7,5,1,4,6,2] => 124
[8,4,1,7,5,3,6,2] => 112
[4,6,3,8,7,1,5,2] => 110
[3,1,5,8,6,7,4,2] => 72
[4,8,1,6,7,3,5,2] => 106
[3,6,4,1,8,7,5,2] => 80
[8,2,6,1,4,7,5,3] => 98
[3,7,1,6,4,8,2,5] => 76
[1,7,3,5,6,8,2,4] => 72
[4,2,7,6,8,3,1,5] => 92
[3,8,2,4,6,7,5,1] => 96
[3,7,2,6,4,8,1,5] => 84
[5,3,7,2,1,8,4,6] => 70
[8,7,6,1,3,4,2,5] => 134
[3,7,8,6,2,1,5,4] => 112
[8,5,3,7,1,6,2,4] => 124
[8,5,7,2,1,3,6,4] => 120
[8,2,6,7,1,3,5,4] => 112
[8,3,6,1,7,5,2,4] => 114
[4,6,1,8,7,2,5,3] => 94
[8,2,6,5,7,4,1,3] => 128
[1,7,2,5,8,6,4,3] => 70
[1,7,4,8,2,6,5,3] => 80
[3,7,8,1,6,5,2,4] => 106
[2,7,8,6,1,3,5,4] => 100
[2,6,5,7,3,4,8,1] => 88
[1,6,4,7,5,8,2,3] => 80
[8,2,6,3,4,7,5,1] => 114
[7,2,6,3,5,4,8,1] => 100
[6,2,7,4,3,5,8,1] => 96
[4,7,5,6,3,2,8,1] => 112
[3,7,6,4,5,2,8,1] => 104
[6,1,7,5,3,8,2,4] => 92
[5,4,1,7,6,8,2,3] => 88
[4,8,5,6,2,7,3,1] => 128
[3,8,6,4,2,7,5,1] => 112
[7,8,5,2,4,6,3,1] => 146
[2,8,1,7,4,3,6,5] => 70
[3,8,4,1,7,2,6,5] => 80
[5,4,7,1,8,3,2,6] => 92
[6,7,1,4,8,3,2,5] => 106
[2,7,1,8,4,5,3,6] => 68
[6,5,1,4,3,8,2,7] => 72
[7,4,2,1,8,5,3,6] => 80
[6,4,3,1,5,8,2,7] => 68
[4,7,5,6,8,3,2,1] => 134
[1,4,8,6,7,5,2,3] => 88
[7,3,8,5,4,6,2,1] => 138
[6,3,5,8,4,7,2,1] => 122
[5,4,3,8,6,7,2,1] => 112
[5,4,2,8,7,3,6,1] => 100
[6,2,5,8,7,3,4,1] => 116
[7,2,8,6,4,3,5,1] => 128
[2,1,8,7,4,6,3,5] => 62
[3,1,8,5,7,6,2,4] => 76
[5,4,1,8,7,6,2,3] => 94
[4,5,2,6,3,1,8,7] => 54
[6,5,2,7,4,8,3,1] => 114
[8,3,7,5,2,1,6,4] => 118
[5,6,3,2,4,1,8,7] => 64
[3,6,2,4,1,5,8,7] => 40
[7,6,1,3,5,8,4,2] => 106
[3,6,7,4,1,8,5,2] => 96
[5,6,3,7,4,8,1,2] => 118
[2,1,6,7,4,8,5,3] => 54
[5,8,3,7,4,2,6,1] => 128
[3,8,7,4,1,2,6,5] => 98
[7,8,1,3,5,2,6,4] => 110
[3,8,4,2,5,7,1,6] => 86
[6,8,3,5,2,7,4,1] => 130
[2,1,8,5,3,7,4,6] => 46
[6,5,3,2,8,7,1,4] => 100
[7,5,2,4,8,1,6,3] => 106
[3,4,2,8,5,7,6,1] => 76
[5,7,1,6,8,2,4,3] => 108
[8,6,2,5,1,7,4,3] => 118
[5,6,2,1,8,7,3,4] => 84
[7,5,2,6,3,8,1,4] => 110
[2,4,3,1,8,5,6,7] => 26
[7,1,8,5,4,3,6,2] => 110
[2,1,7,8,5,4,6,3] => 64
[2,1,5,8,4,6,3,7] => 40
[6,5,3,8,4,1,2,7] => 102
[2,4,8,3,5,6,1,7] => 68
[4,1,8,3,6,5,2,7] => 64
[8,4,1,3,7,2,6,5] => 88
[4,3,8,2,5,1,7,6] => 68
[7,4,3,8,2,5,1,6] => 106
[2,1,4,8,3,5,7,6] => 28
[3,2,5,4,7,1,8,6] => 42
[4,2,5,3,6,1,8,7] => 42
[3,1,5,4,6,2,8,7] => 28
[4,1,5,3,6,2,8,7] => 34
[4,3,5,1,7,2,8,6] => 48
[3,1,5,4,7,2,8,6] => 34
[2,1,5,4,7,3,8,6] => 24
[4,3,5,1,7,6,8,2] => 64
[4,3,6,1,7,5,8,2] => 70
[5,1,6,3,7,4,8,2] => 72
[3,1,6,4,7,5,8,2] => 56
[2,1,6,4,7,5,8,3] => 42
[2,1,6,4,7,3,8,5] => 34
[3,1,6,4,7,2,8,5] => 44
[4,1,6,3,7,2,8,5] => 50
[5,1,6,3,7,2,8,4] => 64
[4,2,5,1,7,3,8,6] => 40
[4,2,6,3,7,1,8,5] => 58
[3,2,6,4,7,1,8,5] => 52
[3,1,4,2,7,6,8,5] => 24
[3,2,6,5,7,1,8,4] => 60
[4,2,6,5,7,3,8,1] => 82
[4,2,6,5,7,1,8,3] => 74
[3,1,5,2,7,6,8,4] => 34
[2,1,5,3,7,6,8,4] => 28
[2,1,6,3,7,5,8,4] => 34
[3,1,6,2,7,5,8,4] => 40
[5,2,6,1,7,4,8,3] => 68
[5,2,6,4,7,3,8,1] => 88
[5,1,6,4,7,2,8,3] => 72
[4,1,6,5,7,2,8,3] => 66
[3,1,6,5,7,2,8,4] => 52
[2,1,6,5,7,3,8,4] => 42
[4,7,2,6,5,3,1,8] => 84
[5,7,6,2,4,3,1,8] => 100
[4,8,2,6,5,1,3,7] => 92
[6,1,5,4,2,8,7,3] => 68
[7,1,5,4,8,2,6,3] => 92
[6,8,7,1,2,4,3,5] => 124
[8,4,3,7,1,5,2,6] => 108
[4,5,2,3,1,8,7,6] => 44
[1,5,8,3,7,6,4,2] => 84
[8,5,1,3,7,6,2,4] => 108
[6,5,1,3,2,8,7,4] => 68
[4,6,2,1,3,8,7,5] => 52
[4,7,2,1,8,3,6,5] => 72
[7,6,1,8,3,2,5,4] => 112
[1,6,8,7,3,5,4,2] => 100
[7,1,8,6,5,2,4,3] => 116
[1,4,2,7,3,6,5,8] => 22
[1,5,2,7,3,6,4,8] => 32
[1,7,2,4,3,8,5,6] => 42
[1,6,2,5,3,8,4,7] => 36
[5,3,6,8,4,7,2,1] => 118
[3,7,2,5,4,8,6,1] => 86
[8,4,2,5,7,3,6,1] => 118
[4,2,6,5,8,3,7,1] => 86
[5,2,6,8,4,3,7,1] => 100
[3,1,6,5,4,8,2,7] => 46
[4,1,6,5,8,3,2,7] => 64
[5,1,6,8,4,3,2,7] => 78
[5,7,1,8,4,3,2,6] => 100
[4,7,1,5,8,3,2,6] => 86
[2,7,1,5,4,3,8,6] => 46
[8,3,1,5,4,7,2,6] => 86
[8,4,1,5,7,3,2,6] => 100
[8,4,6,1,7,3,2,5] => 118
[8,2,6,1,4,3,7,5] => 86
[2,7,6,1,4,3,8,5] => 64
[3,7,6,1,4,8,2,5] => 86
[4,7,6,2,8,3,5,1] => 118
[8,3,6,2,4,7,5,1] => 118
[3,7,6,2,4,8,5,1] => 100
[8,7,3,1,4,6,2,5] => 118
[8,7,2,5,1,3,6,4] => 118
[8,2,6,5,1,3,7,4] => 100
[8,3,6,5,1,7,2,4] => 118
[8,4,6,5,7,1,2,3] => 142
[5,7,6,8,4,1,2,3] => 142
[4,7,6,5,8,1,2,3] => 128
[3,7,6,5,1,8,2,4] => 100
[2,7,6,5,1,3,8,4] => 78
[9,7,8,4,5,6,1,2,3] => 222
[9,7,8,5,6,1,2,3,4] => 216
[9,8,5,6,7,1,2,3,4] => 212
[8,9,5,6,7,1,2,3,4] => 210
[7,4,8,2,5,9,1,3,6] => 148
[6,4,7,2,5,1,3,8,9] => 90
[6,3,2,7,8,1,4,5,9] => 88
[6,7,3,4,8,1,2,5,9] => 118
[8,7,6,5,4,3,2,1,9] => 168
[1,9,8,7,6,5,4,3,2] => 168
[8,7,6,4,5,3,2,1,9] => 166
[1,9,8,7,5,6,4,3,2] => 166
[8,7,5,4,6,3,2,1,9] => 162
[8,7,4,6,5,3,2,1,9] => 162
[1,9,8,6,5,7,4,3,2] => 162
[1,9,8,5,7,6,4,3,2] => 162
[9,1,2,3,4,5,6,7,8] => 72
[2,3,4,5,6,7,8,9,1] => 72
[8,1,2,3,4,5,6,7,9] => 56
[2,3,4,5,6,7,8,1,9] => 56
[8,1,2,3,4,5,6,9,7] => 60
[7,1,2,3,4,5,6,8,9] => 42
[2,3,4,5,6,7,1,8,9] => 42
[2,3,4,5,6,7,9,1,8] => 60
[9,2,1,3,4,5,6,7,8] => 74
[3,2,4,5,6,7,8,9,1] => 74
[9,3,1,2,4,5,6,7,8] => 78
[9,2,3,1,4,5,6,7,8] => 78
[4,2,3,5,6,7,8,9,1] => 78
[3,4,2,5,6,7,8,9,1] => 78
[7,8,6,5,4,3,2,1,9] => 166
[1,8,9,7,6,5,4,3,2] => 166
[7,6,8,5,4,3,2,1,9] => 162
[6,8,7,5,4,3,2,1,9] => 162
[1,8,7,9,6,5,4,3,2] => 162
[1,7,9,8,6,5,4,3,2] => 162
[1,9,2,3,4,5,6,7,8] => 56
[7,8,1,2,3,4,5,6,9] => 96
[1,8,9,2,3,4,5,6,7] => 96
[7,1,8,2,3,4,5,6,9] => 82
[6,8,1,2,3,4,5,7,9] => 82
[1,8,2,9,3,4,5,6,7] => 82
[1,7,9,2,3,4,5,6,8] => 82
[1,2,3,4,5,6,7,9,8] => 2
[2,1,3,4,5,6,7,8,9] => 2
[2,9,1,3,4,5,6,7,8] => 60
[1,8,2,3,4,5,6,9,7] => 46
[7,1,2,3,4,5,6,9,8] => 44
[2,1,9,3,4,5,6,7,8] => 44
[2,8,1,3,4,5,6,7,9] => 46
[1,2,3,4,5,6,7,8,9] => 0
[8,9,1,2,3,4,5,6,7] => 126
[9,8,1,2,3,4,5,6,7] => 128
[7,8,9,1,2,3,4,5,6] => 162
[9,7,8,1,2,3,4,5,6] => 168
[9,8,7,1,2,3,4,5,6] => 170
[6,7,8,9,1,2,3,4,5] => 180
[9,6,7,8,1,2,3,4,5] => 192
[8,9,6,7,1,2,3,4,5] => 196
[9,8,6,7,1,2,3,4,5] => 198
[9,8,7,6,1,2,3,4,5] => 200
[9,5,6,7,8,1,2,3,4] => 200
[9,8,7,5,6,1,2,3,4] => 218
[9,8,7,6,5,1,2,3,4] => 220
[7,8,9,4,5,6,1,2,3] => 216
[9,8,7,4,5,6,1,2,3] => 224
[8,9,6,7,4,5,1,2,3] => 226
[9,8,6,7,4,5,1,2,3] => 228
[9,8,7,6,4,5,1,2,3] => 230
[9,8,7,6,5,4,1,2,3] => 232
[9,7,8,5,6,3,4,1,2] => 232
[9,8,7,5,6,3,4,1,2] => 234
[9,8,7,6,5,3,4,1,2] => 236
[9,8,7,6,5,4,3,1,2] => 238
[9,8,7,6,5,4,3,2,1] => 240
[3,4,1,2,5,6,7,8,9] => 16
[3,2,1,4,5,6,7,8,9] => 8
[4,5,6,1,2,3,7,8,9] => 54
[4,2,5,1,3,6,7,8,9] => 26
[4,3,2,1,5,6,7,8,9] => 20
[5,6,7,8,1,2,3,4,9] => 128
[5,2,6,7,1,3,4,8,9] => 68
[5,6,3,4,1,2,7,8,9] => 64
[5,3,2,6,1,4,7,8,9] => 42
[5,4,3,2,1,6,7,8,9] => 40
[6,2,7,8,9,1,3,4,5] => 146
[6,4,3,2,7,1,5,8,9] => 66
[6,5,4,3,2,1,7,8,9] => 70
[7,4,3,2,8,9,1,5,6] => 116
[7,8,5,6,3,4,1,2,9] => 160
[7,5,3,8,2,6,1,4,9] => 122
[7,5,4,3,2,8,1,6,9] => 100
[7,6,5,4,3,2,1,8,9] => 112
[8,6,9,4,7,2,5,1,3] => 210
[8,6,4,3,9,2,7,1,5] => 164
[8,6,5,4,3,2,9,1,7] => 146
[2,1,4,3,6,5,8,7,10,9] => 10
[4,3,2,1,6,5,8,7,10,9] => 26
[6,3,2,5,4,1,8,7,10,9] => 58
[8,3,2,5,4,7,6,1,10,9] => 106
[10,3,2,5,4,7,6,9,8,1] => 170
[2,1,6,5,4,3,8,7,10,9] => 26
[6,5,4,3,2,1,8,7,10,9] => 74
[8,5,4,3,2,7,6,1,10,9] => 122
[10,5,4,3,2,7,6,9,8,1] => 186
[2,1,8,5,4,7,6,3,10,9] => 58
[8,7,4,3,6,5,2,1,10,9] => 154
[10,7,4,3,6,5,2,9,8,1] => 218
[2,1,10,5,4,7,6,9,8,3] => 106
[10,9,4,3,6,5,8,7,2,1] => 266
[8,9,5,6,3,4,10,1,2,7] => 230
[2,1,4,3,8,7,6,5,10,9] => 26
[4,3,2,1,8,7,6,5,10,9] => 42
[8,3,2,7,6,5,4,1,10,9] => 122
[10,3,2,7,6,5,4,9,8,1] => 186
[2,1,8,7,6,5,4,3,10,9] => 74
[8,7,6,5,4,3,2,1,10,9] => 170
[9,7,6,5,4,3,2,10,1,8] => 206
[10,7,6,5,4,3,2,9,8,1] => 234
[2,1,10,7,6,5,4,9,8,3] => 122
[10,9,6,5,4,3,8,7,2,1] => 282
[2,1,4,3,10,7,6,9,8,5] => 58
[4,3,2,1,10,7,6,9,8,5] => 74
[10,3,2,9,6,5,8,7,4,1] => 218
[2,1,10,9,6,5,8,7,4,3] => 154
[10,9,8,5,4,7,6,3,2,1] => 314
[6,7,8,9,10,1,2,3,4,5] => 250
[7,3,2,8,9,10,1,4,5,6] => 170
[8,5,4,3,2,9,10,1,6,7] => 154
[2,1,4,3,6,5,10,9,8,7] => 26
[4,3,2,1,6,5,10,9,8,7] => 42
[6,3,2,5,4,1,10,9,8,7] => 74
[10,3,2,5,4,9,8,7,6,1] => 186
[2,1,6,5,4,3,10,9,8,7] => 42
[6,5,4,3,2,1,10,9,8,7] => 90
[10,5,4,3,2,9,8,7,6,1] => 202
[2,1,10,5,4,9,8,7,6,3] => 122
[10,9,4,3,8,7,6,5,2,1] => 282
[9,7,5,10,3,8,2,6,1,4] => 266
[2,1,4,3,10,9,8,7,6,5] => 74
[4,3,2,1,10,9,8,7,6,5] => 90
[10,3,2,9,8,7,6,5,4,1] => 234
[2,1,10,9,8,7,6,5,4,3] => 170
[10,9,8,7,6,5,4,3,2,1] => 330
[2,4,6,8,10,1,3,5,7,9] => 110
[5,6,7,8,10,1,2,3,4,9] => 190
[4,7,8,9,10,1,2,3,5,6] => 216
[5,7,8,9,10,1,2,3,4,6] => 232
[4,5,6,8,10,1,2,3,7,9] => 148
[3,7,8,9,10,1,2,4,5,6] => 202
[3,6,7,8,10,1,2,4,5,9] => 160
[3,5,8,9,10,1,2,4,6,7] => 172
[3,6,8,9,10,1,2,4,5,7] => 186
[4,6,7,8,10,1,2,3,5,9] => 174
[4,5,8,9,10,1,2,3,6,7] => 186
[5,6,8,9,10,1,2,3,4,7] => 216
[4,6,8,9,10,1,2,3,5,7] => 200
[3,4,6,8,10,1,2,5,7,9] => 122
[2,7,8,9,10,1,3,4,5,6] => 190
[2,6,7,8,10,1,3,4,5,9] => 148
[2,5,8,9,10,1,3,4,6,7] => 160
[2,6,8,9,10,1,3,4,5,7] => 174
[2,5,6,8,10,1,3,4,7,9] => 122
[2,4,8,9,10,1,3,5,6,7] => 148
[2,4,7,8,10,1,3,5,6,9] => 122
[2,4,6,9,10,1,3,5,7,8] => 122
[2,4,7,9,10,1,3,5,6,8] => 134
[2,5,7,8,10,1,3,4,6,9] => 134
[4,5,6,9,10,1,2,3,7,8] => 160
[5,6,7,9,10,1,2,3,4,8] => 202
[2,5,7,9,10,1,3,4,6,8] => 146
[3,5,6,8,10,1,2,4,7,9] => 134
[3,4,8,9,10,1,2,5,6,7] => 160
[3,4,7,8,10,1,2,5,6,9] => 134
[3,4,6,9,10,1,2,5,7,8] => 134
[3,4,7,9,10,1,2,5,6,8] => 146
[4,5,7,8,10,1,2,3,6,9] => 160
[2,5,6,9,10,1,3,4,7,8] => 134
[2,6,7,9,10,1,3,4,5,8] => 160
[4,5,7,9,10,1,2,3,6,8] => 172
[3,5,7,8,10,1,2,4,6,9] => 146
[3,5,6,9,10,1,2,4,7,8] => 146
[3,6,7,9,10,1,2,4,5,8] => 172
[4,6,7,9,10,1,2,3,5,8] => 186
[3,5,7,9,10,1,2,4,6,8] => 158
[10,8,9,5,6,7,1,2,3,4] => 300
[9,6,10,2,7,8,1,3,4,5] => 252
[10,7,8,3,4,9,1,2,5,6] => 246
[9,5,10,4,6,7,1,2,3,8] => 236
[8,4,9,3,5,10,1,2,6,7] => 196
[8,4,9,2,5,10,1,3,6,7] => 188
[10,8,9,4,5,6,1,2,3,7] => 270
[9,6,10,5,7,8,1,2,3,4] => 282
[10,7,8,5,6,9,1,2,3,4] => 286
[9,8,10,5,6,7,1,2,3,4] => 296
[8,7,9,5,6,10,1,2,3,4] => 272
[8,6,9,2,7,10,1,3,4,5] => 236
[10,6,7,4,5,8,1,2,3,9] => 226
[9,5,10,2,6,7,1,3,4,8] => 218
[10,6,7,3,4,8,1,2,5,9] => 208
[9,8,10,4,5,6,1,2,3,7] => 266
[8,7,9,3,4,10,1,2,5,6] => 232
[8,6,9,5,7,10,1,2,3,4] => 266
[7,6,8,4,5,9,1,2,3,10] => 194
[7,5,8,2,6,9,1,3,4,10] => 170
[7,6,8,3,4,9,1,2,5,10] => 176
[7,5,8,4,6,9,1,2,3,10] => 188
[7,4,8,3,5,9,1,2,6,10] => 156
[7,4,8,2,5,9,1,3,6,10] => 148
[7,8,9,10,1,2,3,4,5,6] => 240
[9,10,7,8,5,6,3,4,1,2] => 320
[9,1,2,3,4,5,6,7,8,10] => 72
[1,2,3,4,5,6,7,8,9,10] => 0
[9,10,7,8,5,6,1,2,3,4] => 304
[9,10,5,6,7,8,1,2,3,4] => 288
[9,10,7,8,1,2,3,4,5,6] => 256
[9,10,1,2,3,4,5,6,7,8] => 160
[10,1,2,3,4,5,6,7,8,9] => 90
[9,8,7,6,5,4,3,2,1,10] => 240
[1,10,9,8,7,6,5,4,3,2] => 240
[1,10,2,3,4,5,6,7,8,9] => 72
[9,7,10,5,6,8,1,2,3,4] => 288
[10,7,8,4,5,9,1,2,3,6] => 264
[9,7,10,4,5,8,1,2,3,6] => 266
[8,7,9,4,5,10,1,2,3,6] => 250
[9,6,10,4,5,7,1,2,3,8] => 242
[8,6,9,4,5,10,1,2,3,7] => 234
[8,6,9,4,7,10,1,2,3,5] => 254
[9,6,10,3,4,7,1,2,5,8] => 224
[8,5,9,3,6,10,1,2,4,7] => 218
[9,5,10,3,6,7,1,2,4,8] => 226
[8,6,9,3,4,10,1,2,5,7] => 216
[8,6,9,3,7,10,1,2,4,5] => 244
[9,6,10,3,7,8,1,2,4,5] => 260
[9,7,10,3,4,8,1,2,5,6] => 248
[8,5,9,4,6,10,1,2,3,7] => 228
[9,6,10,4,7,8,1,2,3,5] => 270
[10,8,9,1,2,3,4,5,6,7] => 216
[9,8,7,5,6,4,3,2,1,10] => 238
[1,10,9,8,6,7,5,4,3,2] => 238
[2,3,4,5,6,7,8,9,10,1] => 90
[2,3,4,5,6,7,8,9,1,10] => 72
[10,2,1,3,4,5,6,7,8,9] => 92
[3,2,4,5,6,7,8,9,10,1] => 92
[8,9,7,6,5,4,3,2,1,10] => 238
[1,9,10,8,7,6,5,4,3,2] => 238
[8,9,1,2,3,4,5,6,7,10] => 126
[1,9,10,2,3,4,5,6,7,8] => 126
[1,2,3,4,5,6,7,8,10,9] => 2
[2,1,3,4,5,6,7,8,9,10] => 2
[9,1,2,3,4,5,6,7,10,8] => 76
[2,10,1,3,4,5,6,7,8,9] => 76
[10,9,1,2,3,4,5,6,7,8] => 162
[8,9,10,1,2,3,4,5,6,7] => 210
[10,9,8,1,2,3,4,5,6,7] => 218
[10,7,8,9,1,2,3,4,5,6] => 252
[10,9,7,8,1,2,3,4,5,6] => 258
[10,9,8,7,1,2,3,4,5,6] => 260
[10,6,7,8,9,1,2,3,4,5] => 270
[9,10,6,7,8,1,2,3,4,5] => 280
[10,9,6,7,8,1,2,3,4,5] => 282
[10,8,9,6,7,1,2,3,4,5] => 286
[10,9,8,6,7,1,2,3,4,5] => 288
[10,9,8,7,6,1,2,3,4,5] => 290
[10,9,5,6,7,8,1,2,3,4] => 290
[8,9,10,5,6,7,1,2,3,4] => 294
[10,9,8,5,6,7,1,2,3,4] => 302
[10,9,7,8,5,6,1,2,3,4] => 306
[10,9,8,7,5,6,1,2,3,4] => 308
[10,9,8,7,6,5,1,2,3,4] => 310
[10,7,8,9,4,5,6,1,2,3] => 306
[9,10,7,8,4,5,6,1,2,3] => 310
[10,9,7,8,4,5,6,1,2,3] => 312
[10,9,8,7,4,5,6,1,2,3] => 314
[10,8,9,6,7,4,5,1,2,3] => 316
[10,9,8,6,7,4,5,1,2,3] => 318
[10,9,8,7,6,4,5,1,2,3] => 320
[10,9,8,7,6,5,4,1,2,3] => 322
[10,9,7,8,5,6,3,4,1,2] => 322
[10,9,8,7,5,6,3,4,1,2] => 324
[10,9,8,7,6,5,3,4,1,2] => 326
[10,9,8,7,6,5,4,3,1,2] => 328
[3,4,1,2,5,6,7,8,9,10] => 16
[3,2,1,4,5,6,7,8,9,10] => 8
[4,5,6,1,2,3,7,8,9,10] => 54
[4,2,5,1,3,6,7,8,9,10] => 26
[4,3,2,1,5,6,7,8,9,10] => 20
[5,6,7,8,1,2,3,4,9,10] => 128
[5,2,6,7,1,3,4,8,9,10] => 68
[5,6,3,4,1,2,7,8,9,10] => 64
[5,3,2,6,1,4,7,8,9,10] => 42
[5,4,3,2,1,6,7,8,9,10] => 40
[6,2,7,8,9,1,3,4,5,10] => 146
[6,7,3,4,8,1,2,5,9,10] => 118
[6,3,2,7,8,1,4,5,9,10] => 88
[6,4,7,2,5,1,3,8,9,10] => 90
[6,4,3,2,7,1,5,8,9,10] => 66
[6,5,4,3,2,1,7,8,9,10] => 70
[7,8,3,4,9,10,1,2,5,6] => 208
[7,8,9,4,5,6,1,2,3,10] => 216
[7,4,3,2,8,9,1,5,6,10] => 116
[7,8,5,6,3,4,1,2,9,10] => 160
[7,5,3,8,2,6,1,4,9,10] => 122
[7,5,4,3,2,8,1,6,9,10] => 100
[7,6,5,4,3,2,1,8,9,10] => 112
[8,5,9,10,2,6,7,1,3,4] => 260
[8,5,3,9,2,6,10,1,4,7] => 184
[8,6,9,4,7,2,5,1,3,10] => 210
[8,6,4,3,9,2,7,1,5,10] => 164
[8,6,5,4,3,2,9,1,7,10] => 146
[8,7,6,5,4,3,2,1,9,10] => 168
[9,7,5,4,3,10,2,8,1,6] => 218
[7,5,8,3,6,9,1,2,4,10] => 178
[8,5,9,2,6,10,1,3,4,7] => 210
[10,9,8,7,6,5,4,3,2,1,11] => 330
[1,11,10,9,8,7,6,5,4,3,2] => 330
[11,1,2,3,4,5,6,7,8,9,10] => 110
[2,3,4,5,6,7,8,9,10,11,1] => 110
[10,1,2,3,4,5,6,7,8,9,11] => 90
[1,11,2,3,4,5,6,7,8,9,10] => 90
[1,2,3,4,5,6,7,8,9,11,10] => 2
[2,1,3,4,5,6,7,8,9,10,11] => 2
[6,7,8,9,10,12,1,2,3,4,5,11] => 342
[2,8,9,10,11,12,1,3,4,5,6,7] => 342
[10,9,8,7,6,5,4,3,2,1,12,11] => 332
[2,1,12,11,10,9,8,7,6,5,4,3] => 332
[2,7,9,10,11,12,1,3,4,5,6,8] => 322
[5,7,8,9,10,12,1,2,3,4,6,11] => 322
[2,6,9,10,11,12,1,3,4,5,7,8] => 304
[2,7,8,10,11,12,1,3,4,5,6,9] => 304
[4,7,8,9,10,12,1,2,3,5,6,11] => 304
[5,6,8,9,10,12,1,2,3,4,7,11] => 304
[2,5,9,10,11,12,1,3,4,6,7,8] => 288
[2,6,8,10,11,12,1,3,4,5,7,9] => 286
[2,7,8,9,11,12,1,3,4,5,6,10] => 288
[3,4,9,10,11,12,1,2,5,6,7,8] => 288
[3,7,8,9,10,12,1,2,4,5,6,11] => 288
[4,6,8,9,10,12,1,2,3,5,7,11] => 286
[5,6,7,8,11,12,1,2,3,4,9,10] => 288
[5,6,7,9,10,12,1,2,3,4,8,11] => 288
[2,4,9,10,11,12,1,3,5,6,7,8] => 274
[2,5,8,10,11,12,1,3,4,6,7,9] => 270
[2,6,7,10,11,12,1,3,4,5,8,9] => 270
[2,6,8,9,11,12,1,3,4,5,7,10] => 270
[2,7,8,9,10,12,1,3,4,5,6,11] => 274
[3,4,8,10,11,12,1,2,5,6,7,9] => 270
[3,6,8,9,10,12,1,2,4,5,7,11] => 270
[4,5,6,10,11,12,1,2,3,7,8,9] => 270
[4,5,8,9,10,12,1,2,3,6,7,11] => 270
[4,6,7,8,11,12,1,2,3,5,9,10] => 270
[4,6,7,9,10,12,1,2,3,5,8,11] => 270
[5,6,7,8,10,12,1,2,3,4,9,11] => 274
[2,4,8,10,11,12,1,3,5,6,7,9] => 256
[2,5,7,10,11,12,1,3,4,6,8,9] => 254
[2,5,8,9,11,12,1,3,4,6,7,10] => 254
[2,6,7,9,11,12,1,3,4,5,8,10] => 254
[2,6,8,9,10,12,1,3,4,5,7,11] => 256
[3,4,7,10,11,12,1,2,5,6,8,9] => 254
[3,4,8,9,11,12,1,2,5,6,7,10] => 254
[3,5,6,10,11,12,1,2,4,7,8,9] => 254
[3,5,8,9,10,12,1,2,4,6,7,11] => 254
[3,6,7,8,11,12,1,2,4,5,9,10] => 254
[3,6,7,9,10,12,1,2,4,5,8,11] => 254
[4,5,6,9,11,12,1,2,3,7,8,10] => 254
[4,5,7,8,11,12,1,2,3,6,9,10] => 254
[4,5,7,9,10,12,1,2,3,6,8,11] => 254
[4,6,7,8,10,12,1,2,3,5,9,11] => 256
[2,1,12,11,10,7,6,9,8,5,4,3] => 316
[10,9,8,5,4,7,6,3,2,1,12,11] => 316
[2,1,12,11,6,5,10,9,8,7,4,3] => 284
[2,1,12,11,8,7,6,5,10,9,4,3] => 284
[10,9,4,3,8,7,6,5,2,1,12,11] => 284
[10,9,6,5,4,3,8,7,2,1,12,11] => 284
[2,1,12,5,4,11,10,9,8,7,6,3] => 236
[2,1,12,11,6,5,8,7,10,9,4,3] => 268
[2,1,12,9,8,7,6,5,4,11,10,3] => 236
[4,3,2,1,12,11,10,9,8,7,6,5] => 188
[10,3,2,9,8,7,6,5,4,1,12,11] => 236
[10,9,4,3,6,5,8,7,2,1,12,11] => 268
[8,7,6,5,4,3,2,1,12,11,10,9] => 188
[10,7,6,5,4,3,2,9,8,1,12,11] => 236
[2,1,4,3,12,11,10,9,8,7,6,5] => 172
[2,1,12,5,4,11,8,7,10,9,6,3] => 220
[2,1,12,7,6,5,4,11,10,9,8,3] => 204
[2,1,12,9,6,5,8,7,4,11,10,3] => 220
[2,1,10,9,8,7,6,5,4,3,12,11] => 172
[4,3,2,1,12,11,8,7,10,9,6,5] => 172
[10,3,2,9,6,5,8,7,4,1,12,11] => 220
[6,5,4,3,2,1,12,11,10,9,8,7] => 140
[10,5,4,3,2,9,8,7,6,1,12,11] => 204
[8,7,4,3,6,5,2,1,12,11,10,9] => 172
[10,7,4,3,6,5,2,9,8,1,12,11] => 220
[8,7,6,5,4,3,2,1,10,9,12,11] => 172
[2,1,4,3,12,11,8,7,10,9,6,5] => 156
[2,1,12,5,4,7,6,11,10,9,8,3] => 188
[2,1,12,5,4,9,8,7,6,11,10,3] => 188
[2,1,12,7,6,5,4,9,8,11,10,3] => 188
[2,1,10,9,6,5,8,7,4,3,12,11] => 156
[4,3,2,1,12,7,6,11,10,9,8,5] => 140
[4,3,2,1,12,9,8,7,6,11,10,5] => 140
[6,3,2,5,4,1,12,11,10,9,8,7] => 124
[10,3,2,5,4,9,8,7,6,1,12,11] => 188
[8,3,2,7,6,5,4,1,12,11,10,9] => 140
[10,3,2,7,6,5,4,9,8,1,12,11] => 188
[6,5,4,3,2,1,12,9,8,11,10,7] => 124
[8,5,4,3,2,7,6,1,12,11,10,9] => 140
[10,5,4,3,2,7,6,9,8,1,12,11] => 188
[8,7,4,3,6,5,2,1,10,9,12,11] => 156
[2,4,6,9,11,12,1,3,5,7,8,10] => 210
[2,4,6,8,11,12,1,3,5,7,9,10] => 196
[3,4,6,9,11,12,1,2,5,7,8,10] => 224
[3,4,6,8,11,12,1,2,5,7,9,10] => 210
[3,5,6,9,11,12,1,2,4,7,8,10] => 238
[2,5,6,9,11,12,1,3,4,7,8,10] => 224
[3,5,6,8,11,12,1,2,4,7,9,10] => 224
[2,5,6,8,11,12,1,3,4,7,9,10] => 210
[2,4,8,9,11,12,1,3,5,6,7,10] => 240
[2,5,7,9,11,12,1,3,4,6,8,10] => 238
[2,5,7,8,11,12,1,3,4,6,9,10] => 224
[4,5,6,8,11,12,1,2,3,7,9,10] => 240
[2,4,7,9,11,12,1,3,5,6,8,10] => 224
[2,4,7,8,11,12,1,3,5,6,9,10] => 210
[4,5,8,9,11,12,1,2,3,6,7,10] => 284
[3,5,8,9,11,12,1,2,4,6,7,10] => 268
[2,4,7,10,11,12,1,3,5,6,8,9] => 240
[4,5,7,9,11,12,1,2,3,6,8,10] => 268
[3,5,7,9,11,12,1,2,4,6,8,10] => 252
[3,5,7,8,11,12,1,2,4,6,9,10] => 238
[3,4,7,9,11,12,1,2,5,6,8,10] => 238
[3,4,7,8,11,12,1,2,5,6,9,10] => 224
[2,4,6,10,11,12,1,3,5,7,8,9] => 226
[4,7,8,9,11,12,1,2,3,5,6,10] => 318
[3,7,8,9,11,12,1,2,4,5,6,10] => 302
[4,6,8,9,11,12,1,2,3,5,7,10] => 300
[3,6,8,9,11,12,1,2,4,5,7,10] => 284
[4,6,7,9,11,12,1,2,3,5,8,10] => 284
[3,6,7,9,11,12,1,2,4,5,8,10] => 268
[2,6,7,8,11,12,1,3,4,5,9,10] => 240
[3,4,6,10,11,12,1,2,5,7,8,9] => 240
[4,5,6,8,10,12,1,2,3,7,9,11] => 226
[3,6,7,8,10,12,1,2,4,5,9,11] => 240
[2,6,7,8,10,12,1,3,4,5,9,11] => 226
[3,4,8,9,10,12,1,2,5,6,7,11] => 240
[2,4,8,9,10,12,1,3,5,6,7,11] => 226
[4,6,8,10,11,12,1,2,3,5,7,9] => 316
[4,6,7,10,11,12,1,2,3,5,8,9] => 300
[4,5,7,10,11,12,1,2,3,6,8,9] => 284
[3,5,7,10,11,12,1,2,4,6,8,9] => 268
[2,5,8,9,10,12,1,3,4,6,7,11] => 240
[5,6,8,10,11,12,1,2,3,4,7,9] => 334
[4,5,8,10,11,12,1,2,3,6,7,9] => 300
[5,6,8,9,11,12,1,2,3,4,7,10] => 318
[3,6,7,10,11,12,1,2,4,5,8,9] => 284
[5,6,7,9,11,12,1,2,3,4,8,10] => 302
[2,5,6,10,11,12,1,3,4,7,8,9] => 240
[4,5,6,9,10,12,1,2,3,7,8,11] => 240
[2,5,6,9,10,12,1,3,4,7,8,11] => 210
[3,4,6,8,10,12,1,2,5,7,9,11] => 196
[3,4,6,9,10,12,1,2,5,7,8,11] => 210
[3,5,8,10,11,12,1,2,4,6,7,9] => 284
[3,4,7,8,10,12,1,2,5,6,9,11] => 210
[3,5,6,8,10,12,1,2,4,7,9,11] => 210
[3,5,9,10,11,12,1,2,4,6,7,8] => 302
[3,5,7,9,10,12,1,2,4,6,8,11] => 238
[3,6,8,10,11,12,1,2,4,5,7,9] => 300
[3,4,7,9,10,12,1,2,5,6,8,11] => 224
[3,5,7,8,10,12,1,2,4,6,9,11] => 224
[3,6,9,10,11,12,1,2,4,5,7,8] => 318
[3,5,6,9,10,12,1,2,4,7,8,11] => 224
[3,7,8,10,11,12,1,2,4,5,6,9] => 318
[3,7,9,10,11,12,1,2,4,5,6,8] => 336
[4,6,9,10,11,12,1,2,3,5,7,8] => 334
[2,5,7,8,10,12,1,3,4,6,9,11] => 210
[2,4,7,9,10,12,1,3,5,6,8,11] => 210
[2,5,6,8,10,12,1,3,4,7,9,11] => 196
[2,4,7,8,10,12,1,3,5,6,9,11] => 196
[2,4,6,9,10,12,1,3,5,7,8,11] => 196
[2,4,6,8,10,12,1,3,5,7,9,11] => 182
[6,7,8,9,11,12,1,2,3,4,5,10] => 356
[5,7,8,9,11,12,1,2,3,4,6,10] => 336
[5,6,7,10,11,12,1,2,3,4,8,9] => 318
[6,7,8,10,11,12,1,2,3,4,5,9] => 372
[5,7,8,10,11,12,1,2,3,4,6,9] => 352
[4,5,7,8,10,12,1,2,3,6,9,11] => 240
[2,6,7,9,10,12,1,3,4,5,8,11] => 240
[6,7,9,10,11,12,1,2,3,4,5,8] => 390
[6,8,9,10,11,12,1,2,3,4,5,7] => 410
[4,7,8,10,11,12,1,2,3,5,6,9] => 334
[5,6,9,10,11,12,1,2,3,4,7,8] => 352
[4,7,9,10,11,12,1,2,3,5,6,8] => 352
[5,7,9,10,11,12,1,2,3,4,6,8] => 370
[4,8,9,10,11,12,1,2,3,5,6,7] => 372
[7,8,9,10,11,12,1,2,3,4,5,6] => 432
[5,8,9,10,11,12,1,2,3,4,6,7] => 390
[3,8,9,10,11,12,1,2,4,5,6,7] => 356
[4,5,9,10,11,12,1,2,3,6,7,8] => 318
[2,1,4,3,6,5,12,9,8,11,10,7] => 60
[2,1,4,3,6,5,8,7,12,11,10,9] => 28
[4,3,2,1,6,5,12,9,8,11,10,7] => 76
[4,3,2,1,6,5,8,7,12,11,10,9] => 44
[6,3,2,5,4,1,12,9,8,11,10,7] => 108
[2,1,6,5,4,3,12,9,8,11,10,7] => 76
[6,3,2,5,4,1,8,7,12,11,10,9] => 76
[2,1,6,5,4,3,8,7,12,11,10,9] => 44
[2,1,4,3,12,9,8,7,6,11,10,5] => 124
[2,1,12,5,4,7,6,9,8,11,10,3] => 172
[2,1,8,5,4,7,6,3,12,11,10,9] => 76
[6,5,4,3,2,1,8,7,12,11,10,9] => 92
[2,1,4,3,12,7,6,9,8,11,10,5] => 108
[2,1,4,3,8,7,6,5,12,11,10,9] => 44
[12,5,4,3,2,9,8,7,6,11,10,1] => 284
[12,3,2,5,4,9,8,7,6,11,10,1] => 268
[2,1,4,3,12,7,6,11,10,9,8,5] => 124
[12,5,4,3,2,7,6,9,8,11,10,1] => 268
[12,3,2,5,4,7,6,9,8,11,10,1] => 252
[8,3,2,5,4,7,6,1,12,11,10,9] => 124
[4,3,2,1,12,7,6,9,8,11,10,5] => 124
[4,3,2,1,8,7,6,5,12,11,10,9] => 60
[2,1,4,3,6,5,12,11,10,9,8,7] => 76
[12,9,4,3,8,7,6,5,2,11,10,1] => 364
[12,3,2,9,8,7,6,5,4,11,10,1] => 316
[12,9,4,3,6,5,8,7,2,11,10,1] => 348
[12,3,2,9,6,5,8,7,4,11,10,1] => 300
[12,7,4,3,6,5,2,9,8,11,10,1] => 300
[12,3,2,7,6,5,4,9,8,11,10,1] => 268
[2,1,8,7,6,5,4,3,12,11,10,9] => 92
[4,3,2,1,6,5,12,11,10,9,8,7] => 92
[6,5,4,3,2,1,8,7,10,9,12,11] => 76
[8,3,2,7,6,5,4,1,10,9,12,11] => 124
[2,1,8,7,6,5,4,3,10,9,12,11] => 76
[4,3,2,1,10,9,8,7,6,5,12,11] => 92
[2,1,4,3,10,9,8,7,6,5,12,11] => 76
[12,11,4,3,6,5,8,7,10,9,2,1] => 412
[12,7,4,3,6,5,2,11,10,9,8,1] => 316
[12,5,4,3,2,7,6,11,10,9,8,1] => 284
[12,3,2,5,4,7,6,11,10,9,8,1] => 268
[2,1,10,5,4,9,8,7,6,3,12,11] => 124
[12,11,6,5,4,3,8,7,10,9,2,1] => 428
[12,5,4,3,2,11,8,7,10,9,6,1] => 316
[12,9,6,5,4,3,8,7,2,11,10,1] => 364
[12,3,2,7,6,5,4,11,10,9,8,1] => 284
[12,7,6,5,4,3,2,9,8,11,10,1] => 316
[2,1,6,5,4,3,12,11,10,9,8,7] => 92
[6,5,4,3,2,1,10,9,8,7,12,11] => 92
[2,1,6,5,4,3,10,9,8,7,12,11] => 44
[4,3,2,1,6,5,8,7,10,9,12,11] => 28
[4,3,2,1,6,5,10,9,8,7,12,11] => 44
[12,3,2,5,4,11,8,7,10,9,6,1] => 300
[4,3,2,1,8,7,6,5,10,9,12,11] => 44
[6,3,2,5,4,1,8,7,10,9,12,11] => 60
[12,3,2,5,4,11,10,9,8,7,6,1] => 316
[10,3,2,5,4,7,6,9,8,1,12,11] => 172
[12,3,2,11,6,5,8,7,10,9,4,1] => 348
[4,3,2,1,10,7,6,9,8,5,12,11] => 76
[8,3,2,5,4,7,6,1,10,9,12,11] => 108
[12,3,2,11,6,5,10,9,8,7,4,1] => 364
[6,3,2,5,4,1,10,9,8,7,12,11] => 76
[12,3,2,11,8,7,6,5,10,9,4,1] => 364
[12,3,2,11,10,7,6,9,8,5,4,1] => 396
[12,11,4,3,6,5,10,9,8,7,2,1] => 428
[2,1,8,5,4,7,6,3,10,9,12,11] => 60
[2,1,4,3,10,7,6,9,8,5,12,11] => 60
[2,1,6,5,4,3,8,7,10,9,12,11] => 28
[2,1,4,3,8,7,6,5,10,9,12,11] => 28
[2,1,4,3,6,5,10,9,8,7,12,11] => 28
[2,1,4,3,6,5,8,7,10,9,12,11] => 12
[12,9,8,7,6,5,4,3,2,11,10,1] => 412
[12,9,8,5,4,7,6,3,2,11,10,1] => 396
[12,7,6,5,4,3,2,11,10,9,8,1] => 332
[12,11,8,7,6,5,4,3,10,9,2,1] => 476
[12,11,8,5,4,7,6,3,10,9,2,1] => 460
[8,5,4,3,2,7,6,1,10,9,12,11] => 124
[2,1,10,7,6,5,4,9,8,3,12,11] => 124
[12,11,10,7,6,5,4,9,8,3,2,1] => 524
[12,11,10,9,6,5,8,7,4,3,2,1] => 556
[12,11,4,3,8,7,6,5,10,9,2,1] => 428
[12,11,6,5,4,3,10,9,8,7,2,1] => 444
[12,11,4,3,10,7,6,9,8,5,2,1] => 460
[12,11,10,5,4,7,6,9,8,3,2,1] => 508
[12,11,4,3,10,9,8,7,6,5,2,1] => 476
[12,11,10,9,8,7,6,5,4,3,2,1] => 572
[12,11,10,5,4,9,8,7,6,3,2,1] => 524
[12,3,2,11,10,9,8,7,6,5,4,1] => 412
[12,5,4,3,2,11,10,9,8,7,6,1] => 332
[2,1,10,5,4,7,6,9,8,3,12,11] => 108
[2,5,7,9,10,12,1,3,4,6,8,11] => 224
click to show generating function       
Description
The spearman's rho of a permutation and the identity permutation.
This is, for a permutation $\pi$ of $n$, given by $\sum_{i=1}^n (\pi(i)−i)^2$.
References
[1] Chatterjee, S., Diaconis, P. A central limit theorem for a new statistic on permutations arXiv:1608.01666
Code
def statistic(pi):
    return sum( (pi(i) - i)^2 for i in [1 .. len(pi)])

Created
May 31, 2017 at 10:52 by Christian Stump
Updated
May 12, 2020 at 15:34 by Martin Rubey