Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that:  the first elevator is currently on the floor $$$a$$$ (it is currently motionless),  the second elevator is located on floor $$$b$$$ and goes to floor $$$c$$$ ($$$b \ne c$$$). Please note, if $$$b=1$$$, then the elevator is already leaving the floor $$$1$$$ and Vlad does not have time to enter it. If you call the first elevator, it will immediately start to go to the floor $$$1$$$. If you call the second one, then first it will reach the floor $$$c$$$ and only then it will go to the floor $$$1$$$. It takes $$$|x - y|$$$ seconds for each elevator to move from floor $$$x$$$ to floor $$$y$$$.Vlad wants to call an elevator that will come to him faster. Help him choose such an elevator.

The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.

Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output:   $$$1$$$, if it is better to call the first elevator;  $$$2$$$, if it is better to call the second one;  $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).

NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows:  At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is already going to another floor;  in $$$1$$$ second after the call, the first elevator would be on the floor $$$2$$$, the second one would also reach the floor $$$2$$$ and now can go to the floor $$$1$$$;  in $$$2$$$ seconds, any elevator would reach the floor $$$1$$$. In the third test case of the example, the first elevator will arrive in $$$2$$$ seconds, and the second in $$$1$$$.

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		arr := readArrInt64()
		a, b, c := arr[0], arr[1], arr[2]
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(3)
			continue
		}
	}
}

func abs(i int64) int64 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

func readArrString() []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readArrInt64() []int64 {
	numbs := readArrString()
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}
	return arr
}

package main

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

func main() {
	f := bufio.NewWriter(os.Stdout)
	defer f.Flush()
	var t int64
	fmt.Scanf("%d\n", &t)
	var i int64
	for i = 0; i < t; i++ {
		var a, b, c int64
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		a--
		r := b - c
		if r < 0 {
			r = c - b
		}
		r = r + c - 1
		if r == a {
			f.Write([]byte("3\n"))
		} else if r > a {
			f.Write([]byte("1\n"))
		} else {
			f.Write([]byte("2\n"))
		}
	}
}

package main

import (
	"bytes"
	"fmt"
	"os"
)

func main() {
	var t int64
	fmt.Scanf("%d\n", &t)
	var i int64
	answer := new(bytes.Buffer)
	for i = 0; i < t; i++ {
		var a, b, c int64
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		a--
		r := b - c
		if r < 0 {
			r = c - b
		}
		r = r + c - 1
		if r == a {
			answer.WriteString("3\n")
		} else if r > a {
			answer.WriteString("1\n")
		} else {
			answer.WriteString("2\n")
		}
	}
	answer.WriteTo(os.Stdout)
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t float64
	fmt.Scanf("%f\n", &t)
	var i float64
	for i = 0; i < t; i++ {
		var a, b, c float64
		fmt.Scanf("%f %f %f\n", &a, &b, &c)
		a--
		r := math.Abs(b-c) + c - 1
		if r == a {
			fmt.Println(3)
		} else if r > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int64
	fmt.Scanf("%d\n", &t)
	for i := 0; int64(i) < t; i++ {
		var a, b, c int64
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		a--
		r := int64(math.Abs(float64(b-c))) + c - 1
		if r == a {
			fmt.Println(3)
		} else if r > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if b >= c {
			if a-1 > b-1 {
				fmt.Println(2)
			} else if a-1 == b-1 {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		} else {
			if a-1 > ((c-b)*2)+ (b-1) {
				fmt.Println(2)
			} else if a-1 == ((c-b)*2)+ (b-1) {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int
	fmt.Scan(&t)
	for t > 0 {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		// fmt.Println(a,b,c)
		if a-1 < int(math.Abs(float64(c-b))+math.Abs(float64(c)-1)) {
			fmt.Println(1)
		} else if a-1 > int(math.Abs(float64(c-b))+math.Abs(float64(c)-1)) {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		t--
	}
}

// 1 2 1

package main

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

func abs(a int) int {
	if a < 0 {
		a = -a
	}
	return a
}

func main() {
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()

	var t, a, b, c int
	var time1, time2 int

	fmt.Fscan(r, &t)

	for i := 0; i < t; i++ {
		fmt.Fscan(r, &a, &b, &c)

		time1 = abs(a - 1)
		time2 = abs(b - c) + abs(c - 1)

		if time1 < time2 {
			fmt.Fprintln(w, 1)
		} else if time2 < time1 {
			fmt.Fprintln(w, 2)
		} else {
			fmt.Fprintln(w, 3)
		}
	}
}

package main

import (
	"fmt"
)

func abs(a int) int {
	if a < 0 {
		a = -a
	}
	return a
}

func main() {
	var t, a, b, c int
	var time1, time2 int

	_, _ = fmt.Scanln(&t)

	for i := 0; i < t; i++ {
		_, _ = fmt.Scanln(&a, &b, &c)

		time1 = abs(a - 1)
		time2 = abs(b - c) + abs(c - 1)

		if time1 < time2 {
			fmt.Println(1)
		} else if time2 < time1 {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
	}
}

package main

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

func ScanInt(scanner *bufio.Scanner) int {
	if !scanner.Scan() {
		panic("nothing to scan")
	}
	str := scanner.Text()
	n, err := strconv.Atoi(str)
	if err != nil {
		panic(err)
	}
	return n
}

const whitespaceSymbols = "\t\n\v\f\r "

func splitFunc(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}

	i := bytes.IndexAny(data, whitespaceSymbols)
	if i > 0 {
		return i + 1, data[:i], nil
	}
	if i == -1 {
		if atEOF {
			return len(data), data, nil
		}
		return 0, nil, nil
	}

	trimmed := bytes.TrimLeft(data, whitespaceSymbols)
	advance = len(data) - len(trimmed)
	if atEOF && len(trimmed) != 0 {
		trimmed = trimmed[:bytes.IndexAny(trimmed, whitespaceSymbols)]
		return advance + len(trimmed), trimmed, nil
	}
	return advance, nil, nil
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(nil, 1<<30)
	scanner.Split(splitFunc)
	t := ScanInt(scanner)
	for i := 0; i < t; i++ {
		a := ScanInt(scanner)
		b := ScanInt(scanner)
		c := ScanInt(scanner)
		if b > c {
			switch {
			case a < b:
				fmt.Println(1)
			case a == b:
				fmt.Println(3)
			default:
				fmt.Println(2)
			}
			continue
		}
		switch {
		case a-1 < c-b+c-1:
			fmt.Println(1)
		case a-1 == c-b+c-1:
			fmt.Println(3)
		default:
			fmt.Println(2)
		}
	}
}

package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"strconv"
	"strings"
	"sync"
	"time"
)

func main() {
	data, _ := ioutil.ReadAll(os.Stdin)
	ctroki := strings.Split(string(data), "\r\n")
	n, _ := strconv.Atoi(ctroki[0])
	pos := 1

	var wg sync.WaitGroup
	wg.Add(n)
	ch := make(chan struct{})

	go func() {
		wg.Wait()
		close(ch)
	}()
	timeout := 5 * time.Second

	output := make([]string, n)
	for i := 0; i < n; i++ {
		if ctroki[pos] == "" {
			continue
		}
		go atomicTotal(&output[i], ctroki[pos], &wg)

		pos = pos + 1
	}
	select {
	case <-time.After(timeout):
		fmt.Println(strings.Join(output, "\n"))
	case <-ch:
		fmt.Println(strings.Join(output, "\n"))
	}

}

func atomicTotal(output *string, nabor string, wg *sync.WaitGroup) {
	defer wg.Done()
	arr := strings.Split(nabor, " ")

	n1 := atoi(arr[0])
	n2 := atoi(arr[1])
	n3 := atoi(arr[2])

	fst := n3 - n2
	if fst < 0 {
		fst *= -1
	}
	if n1 == 1 || fst+n3-1 > n1-1 {
		*output = fmt.Sprint(1)
	} else if fst+n3-1 < n1-1 {
		*output = fmt.Sprint(2)
	} else {
		*output = fmt.Sprint(3)
	}

}

func atoi(str string) int64 {
	var n int64
	for i := 0; i < len(str); i++ {
		var char byte = '0'
		s := str[i]
		c := 0
		for s != char {
			char++
			c++
		}
		n = n*10 + int64(c)
	}
	return n
}

package main

import (
	"fmt"
)

func abs(x int) int {
	if (x < 0) {
		return -x;
	} else {
		return x;
	}
}

func main() {
	var N int;
	fmt.Scan(&N);

	for T := 0; T < N; T++ {
		var a, b, c int;
		fmt.Scan(&a, &b, &c);
		x := a - 1;
		y := abs(b - c) + c - 1;
		if (x < y) {
			fmt.Println(1);
		} else if (x > y) {
			fmt.Println(2);
		} else {
			fmt.Println(3);
		}
	}
}

// cf1729a project main.go
package main

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

func main() {
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var t int
	fmt.Fscan(r, &t)
	for i := 0; i < t; i++ {
		var a, b, c int64
		fmt.Fscan(r, &a, &b, &c)
		var x int64 = 0
		if b > c {
			x = b
		} else {
			x = c + c - b
		}
		var r int64 = 3
		if a < x {
			r = 1
		} else if a > x {
			r = 2
		}
		fmt.Fprintln(w, r)
	}
}

package main

import "fmt"

func main() {

	var tc int

	fmt.Scan(&tc)

	for t := 1; t <= tc; t++ {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		if b < c {
			b = (c - b) + c
		}
		ans := 0
		if a < b {
			ans = 1
		}
		if a > b {
			ans = 2
		}
		if a == b {
			ans = 3
		}
		fmt.Println(ans)
	}

}

package main

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

var in *bufio.Reader
var out *bufio.Writer

////////////////////////////////////////////////

func solve() {
	a := ReadInt()
	b := ReadInt()
	c := ReadInt()

	x := a - 1
	y := Abs(b-c) + c - 1

	if x < y {
		Println(1)
	} else if x == y {
		Println(3)
	} else {
		Println(2)
	}
}

func main() {
	in = bufio.NewReader(os.Stdin)
	out = bufio.NewWriter(os.Stdout)
	defer out.Flush()

	t := 1
	t = ReadInt()

	for i := 0; i < t; i++ {
		solve()
	}
}

func ReadInt() int {
	var x int
	fmt.Fscan(in, &x)
	return x
}

func ReadInts(n int) []int {
	a := make([]int, n)
	for i, _ := range a {
		a[i] = ReadInt()
	}
	return a
}

func Print(a ...any) {
	fmt.Fprint(out, a...)
}

func Println(a ...any) {
	fmt.Fprintln(out, a...)
}

type IntPair struct {
	x int
	y int
}

func Iota(a []int, start int) {
	for i := 0; i < len(a); i++ {
		a[i] = start
		start++
	}
}

func NextPermutation(a []int) bool {
	n := len(a)
	pos := n - 2
	for ; pos >= 0; pos-- {
		if a[pos] < a[pos+1] {
			break
		}
	}
	if pos == -1 {
		return false
	}
	for i := n - 1; i >= 0; i-- {
		if a[i] > a[pos] {
			a[i], a[pos] = a[pos], a[i]
			Reverse(a[pos+1 : n])
			break
		}
	}
	return true
}

func Reverse(a []int) {
	n := len(a)
	for i := 0; i < n/2; i++ {
		a[i], a[n-i-1] = a[n-i-1], a[i]
	}
}

func RemoveIf(a []int, cond func(int) bool) []int {
	n := len(a)
	pos := 0
	for i := 0; i < n; i++ {
		if !cond(a[i]) {
			a[pos] = a[i]
			pos++
		}
	}
	return a[0:pos]
}

func Min(a int, b int) int {
	if a < b {
		return a
	} else {
		return b
	}
}

func Max(a int, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func Abs(x int) int {
	if x < 0 {
		return -x
	} else {
		return x
	}
}

package main

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

func main() {
	var (
		t int
		a int
		b int
		c int
	)
	fmt.Scanf("%d\n", &t)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < t; i++ {
		scanner.Scan()
		st := strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(st[0])
		b, _ = strconv.Atoi(st[1])
		c, _ = strconv.Atoi(st[2])
		if b > c {
			if a > b {
				fmt.Println(2)
			} else if b > a {
				fmt.Println(1)
			} else {
				fmt.Println(3)
			}
		} else {
			d := c - b
			if a > c+d {
				fmt.Println(2)
			} else if c+d > a {
				fmt.Println(1)
			} else {
				fmt.Println(3)
			}
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {

	// output 1 -> |a-1| < |b-c|+|c-1|
	// output 2 -> |a-1| > |b-c|+|c-1|
	// output 3 -> |a-1| = |b-c|+|c-1|

	var t int
	fmt.Scanln(&t)

	for i := 0; i < t; i++ {
		var a, b, c int
		fmt.Scanln(&a, &b, &c)

		if math.Abs(float64(a)-1) < math.Abs(float64(b)-float64(c))+math.Abs(float64(c)-1) {
			fmt.Println(1)
		} else if math.Abs(float64(a)-1) > math.Abs(float64(b)-float64(c))+math.Abs(float64(c)-1) {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
	}

}

package main

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

func main() {
	var T int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &T)
	for T > 0 {
		var a, b, c float64
		fmt.Fscan(in, &a)
		fmt.Fscan(in, &b)
		fmt.Fscan(in, &c)
		t1,t2 := a,math.Abs(b-c)+c
		if(t1>t2){
			fmt.Println(2)
		}
		if(t1<t2){
			fmt.Println(1)
		}
		if(t1==t2){
			fmt.Println(3)
		}
		T-=1
	}
}

package main

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

func main() {
	var T int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &T)
	for T > 0 {
		var a, b, c float64
		fmt.Fscan(in, &a)
		fmt.Fscan(in, &b)
		fmt.Fscan(in, &c)
		x := a - 1
		y := math.Abs(b-c) + (c - 1)
		if x < y {
			fmt.Println(1)
		} else if x > y {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		T--
	}
}

package main

import (
	"fmt"
)

func main() {
	solve()
}

func solve() {
	var t, a, b, c int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		if (a - 1) == abs(c - b) + c - 1 {
			fmt.Println(3)
		} else if (a - 1) < abs(c - b) + c - 1 {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

func min(a int, b int) int {
	if a < b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

package main

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

func main() {
        reader := bufio.NewReader(os.Stdin)
        testCnt, _ := reader.ReadString('\n')
        testCnt = strings.TrimSpace(testCnt)
        testCntI, _ := strconv.Atoi(testCnt)
        //fmt.Println("test cnt: ", testCntI)
        for i := 0; i < testCntI; i++ {
                testCase, _ := reader.ReadString('\n')
                //fmt.Println("test case: ", testCase)
                solution(testCase)
        }
}

func solution(input string) {
        //fmt.Println(input)
        //fmt.Println("sol")
        arr := strings.Fields(input)
        //fmt.Println(arr, arr[0])
        liftA, _ := strconv.Atoi(arr[0])
        liftB, _ := strconv.Atoi(arr[1])
        liftC, _ := strconv.Atoi(arr[2])
        //fmt.Println(liftA, liftB, liftC)

        wayA := liftA-1

        wayB := 0
        if liftB > liftC {
                wayB = liftB - liftC
        } else {
                wayB = liftC - liftB
        }
  //fmt.Println("way B: ", wayB)
        wayB = wayB + liftC - 1

        //fmt.Println(wayA, wayB)

  if wayA < wayB {
    fmt.Println(1)
  } else if wayB < wayA {
    fmt.Println(2)
  } else {
    fmt.Println(3)
  }
}

package main

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

var in = bufio.NewReader(os.Stdin)

func ReverseSlice(s interface{}) {
	size := reflect.ValueOf(s).Len()
	swap := reflect.Swapper(s)
	for i, j := 0, size-1; i < j; i, j = i+1, j-1 {
		swap(i, j)
	}
}

func main() {
	var t int
	fmt.Fscan(in, &t)

	for ; t > 0; t-- {
		var a, b, c int
		fmt.Fscan(in, &a, &b, &c)
		total := b
		if c >= b {
			total = 2*c - b
		}
		if total == a {
			fmt.Println(3)
		} else if total > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main

import "fmt"

func Abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func main() {
	var t, a, b, c int
	fmt.Scanln(&t)
	for i := 0; i < t; i++ {
		fmt.Scan(&a)
		fmt.Scan(&b)
		fmt.Scan(&c)
		if a < Abs(b-c)+c {
			fmt.Println(1)
		} else if a > Abs(b-c)+c {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
	}

}

package main

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

type Number interface {
	int | int8 | int16 | int32 | int64 | float32 | float64 | byte | uint | uint16 | uint32 | uint64
}

var (
	scanner  *bufio.Scanner
	byWord   bool   //tokenization flag for scanWordsOrLines
	eof      bool   //flag whether reached end-of-file
	splitter string //scan delimiter for Ints(), etc.
)

func firstElevatorTime(a int) int {
	return a - 1
}

func secondElevatorTime(b, c int) int {
	return abs(b-c) + firstElevatorTime(c)
}

func compareTime(first, second int) int {
	if first < second {
		return 1
	}
	if first > second {
		return 2
	}
	return 3
}

func answer(a, b, c int) int {
	return compareTime(firstElevatorTime(a), secondElevatorTime(b, c))
}

// main
func main() {
	for t := Int(); t > 0; t-- {
		a, b, c := Ints3()
		fmt.Println(answer(a, b, c))
	}
}

// numeric library
func abs[T Number](a T) T {
	if a > 0 {
		return a
	}
	return -a
}

// stdin functions
func init() {
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(scanWordsOrLines)
	eof = false
	splitter = " "
}

// its behavior can be changed by byWord variable.
func scanWordsOrLines(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if byWord {
		return bufio.ScanWords(data, atEOF)
	}
	return bufio.ScanLines(data, atEOF)
}

// byword arg changes how to scan.
func text(byword bool) string {
	byWord = byword
	if scanner.Scan() {
		return scanner.Text()
	}
	eof = true //reached end of file
	return ""
}

// EOF returns if scanner cursor has reached end-of-line or not.
func EOF() bool {
	return eof
}

// Word returns word like "dog" or "foobar" at the cursor.
func Word() string {
	return text(true)
}

// Words returns word array like ["dog", "foobar"] at the line.
func Words() []string {
	return strings.Split(Line(), splitter)
}

// Line returns whole line like "dog foobar" at the cursor.
func Line() string {
	return text(false)
}

// Lines returns array of all lines from the current cursor to end-of-file.
func Lines() []string {
	var ret []string
	for {
		l := Line()
		if EOF() {
			break
		}
		ret = append(ret, l)
	}
	return ret
}

func Byte() byte {
	return byte(Uint8())
}

// auto-generated code
func Int() int {
	ret, _ := strconv.ParseInt(Word(), 10, 0)
	return int(ret)
}

func Ints() []int {
	words := Words()
	n := len(words)
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseInt(words[i], 10, 0)
		ret[i] = int(v)
	}
	return ret
}

func Ints2() (int, int) {
	return Int(), Int()
}

func Ints3() (int, int, int) {
	return Int(), Int(), Int()
}

func Ints4() (int, int, int, int) {
	return Int(), Int(), Int(), Int()
}

func Ints5() (int, int, int, int, int) {
	return Int(), Int(), Int(), Int(), Int()
}

func Ints6() (int, int, int, int, int, int) {
	return Int(), Int(), Int(), Int(), Int(), Int()
}

func Ints7() (int, int, int, int, int, int, int) {
	return Int(), Int(), Int(), Int(), Int(), Int(), Int()
}

func Ints8() (int, int, int, int, int, int, int, int) {
	return Int(), Int(), Int(), Int(), Int(), Int(), Int(), Int()
}

func Ints9() (int, int, int, int, int, int, int, int, int) {
	return Int(), Int(), Int(), Int(), Int(), Int(), Int(), Int(), Int()
}

func IntsN(n int) []int {
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = Int()
	}
	return ret
}

func Int8() int8 {
	ret, _ := strconv.ParseInt(Word(), 10, 8)
	return int8(ret)
}

func Int8s() []int8 {
	words := Words()
	n := len(words)
	ret := make([]int8, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseInt(words[i], 10, 8)
		ret[i] = int8(v)
	}
	return ret
}

func Int8s2() (int8, int8) {
	return Int8(), Int8()
}

func Int8s3() (int8, int8, int8) {
	return Int8(), Int8(), Int8()
}

func Int8s4() (int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8()
}

func Int8s5() (int8, int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8(), Int8()
}

func Int8s6() (int8, int8, int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8(), Int8(), Int8()
}

func Int8s7() (int8, int8, int8, int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8()
}

func Int8s8() (int8, int8, int8, int8, int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8()
}

func Int8s9() (int8, int8, int8, int8, int8, int8, int8, int8, int8) {
	return Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8(), Int8()
}

func Int8sN(n int) []int8 {
	ret := make([]int8, n)
	for i := 0; i < n; i++ {
		ret[i] = Int8()
	}
	return ret
}

func Int16() int16 {
	ret, _ := strconv.ParseInt(Word(), 10, 16)
	return int16(ret)
}

func Int16s() []int16 {
	words := Words()
	n := len(words)
	ret := make([]int16, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseInt(words[i], 10, 16)
		ret[i] = int16(v)
	}
	return ret
}

func Int16s2() (int16, int16) {
	return Int16(), Int16()
}

func Int16s3() (int16, int16, int16) {
	return Int16(), Int16(), Int16()
}

func Int16s4() (int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16()
}

func Int16s5() (int16, int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16(), Int16()
}

func Int16s6() (int16, int16, int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16(), Int16(), Int16()
}

func Int16s7() (int16, int16, int16, int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16()
}

func Int16s8() (int16, int16, int16, int16, int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16()
}

func Int16s9() (int16, int16, int16, int16, int16, int16, int16, int16, int16) {
	return Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16(), Int16()
}

func Int16sN(n int) []int16 {
	ret := make([]int16, n)
	for i := 0; i < n; i++ {
		ret[i] = Int16()
	}
	return ret
}

func Int32() int32 {
	ret, _ := strconv.ParseInt(Word(), 10, 32)
	return int32(ret)
}

func Int32s() []int32 {
	words := Words()
	n := len(words)
	ret := make([]int32, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseInt(words[i], 10, 32)
		ret[i] = int32(v)
	}
	return ret
}

func Int32s2() (int32, int32) {
	return Int32(), Int32()
}

func Int32s3() (int32, int32, int32) {
	return Int32(), Int32(), Int32()
}

func Int32s4() (int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32()
}

func Int32s5() (int32, int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32(), Int32()
}

func Int32s6() (int32, int32, int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32(), Int32(), Int32()
}

func Int32s7() (int32, int32, int32, int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32()
}

func Int32s8() (int32, int32, int32, int32, int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32()
}

func Int32s9() (int32, int32, int32, int32, int32, int32, int32, int32, int32) {
	return Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32(), Int32()
}

func Int32sN(n int) []int32 {
	ret := make([]int32, n)
	for i := 0; i < n; i++ {
		ret[i] = Int32()
	}
	return ret
}

func Int64() int64 {
	ret, _ := strconv.ParseInt(Word(), 10, 64)
	return int64(ret)
}

func Int64s() []int64 {
	words := Words()
	n := len(words)
	ret := make([]int64, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseInt(words[i], 10, 64)
		ret[i] = int64(v)
	}
	return ret
}

func Int64s2() (int64, int64) {
	return Int64(), Int64()
}

func Int64s3() (int64, int64, int64) {
	return Int64(), Int64(), Int64()
}

func Int64s4() (int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64()
}

func Int64s5() (int64, int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64(), Int64()
}

func Int64s6() (int64, int64, int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64(), Int64(), Int64()
}

func Int64s7() (int64, int64, int64, int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64()
}

func Int64s8() (int64, int64, int64, int64, int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64()
}

func Int64s9() (int64, int64, int64, int64, int64, int64, int64, int64, int64) {
	return Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64(), Int64()
}

func Int64sN(n int) []int64 {
	ret := make([]int64, n)
	for i := 0; i < n; i++ {
		ret[i] = Int64()
	}
	return ret
}

func Uint() uint {
	ret, _ := strconv.ParseUint(Word(), 10, 0)
	return uint(ret)
}

func Uints() []uint {
	words := Words()
	n := len(words)
	ret := make([]uint, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseUint(words[i], 10, 0)
		ret[i] = uint(v)
	}
	return ret
}

func Uints2() (uint, uint) {
	return Uint(), Uint()
}

func Uints3() (uint, uint, uint) {
	return Uint(), Uint(), Uint()
}

func Uints4() (uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint()
}

func Uints5() (uint, uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint(), Uint()
}

func Uints6() (uint, uint, uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint(), Uint(), Uint()
}

func Uints7() (uint, uint, uint, uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint()
}

func Uints8() (uint, uint, uint, uint, uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint()
}

func Uints9() (uint, uint, uint, uint, uint, uint, uint, uint, uint) {
	return Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint(), Uint()
}

func UintsN(n int) []uint {
	ret := make([]uint, n)
	for i := 0; i < n; i++ {
		ret[i] = Uint()
	}
	return ret
}

func Uint8() uint8 {
	ret, _ := strconv.ParseUint(Word(), 10, 8)
	return uint8(ret)
}

func Uint8s() []uint8 {
	words := Words()
	n := len(words)
	ret := make([]uint8, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseUint(words[i], 10, 8)
		ret[i] = uint8(v)
	}
	return ret
}

func Uint8s2() (uint8, uint8) {
	return Uint8(), Uint8()
}

func Uint8s3() (uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8()
}

func Uint8s4() (uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8s5() (uint8, uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8s6() (uint8, uint8, uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8s7() (uint8, uint8, uint8, uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8s8() (uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8s9() (uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8) {
	return Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8(), Uint8()
}

func Uint8sN(n int) []uint8 {
	ret := make([]uint8, n)
	for i := 0; i < n; i++ {
		ret[i] = Uint8()
	}
	return ret
}

func Uint16() uint16 {
	ret, _ := strconv.ParseUint(Word(), 10, 16)
	return uint16(ret)
}

func Uint16s() []uint16 {
	words := Words()
	n := len(words)
	ret := make([]uint16, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseUint(words[i], 10, 16)
		ret[i] = uint16(v)
	}
	return ret
}

func Uint16s2() (uint16, uint16) {
	return Uint16(), Uint16()
}

func Uint16s3() (uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16()
}

func Uint16s4() (uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16s5() (uint16, uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16s6() (uint16, uint16, uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16s7() (uint16, uint16, uint16, uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16s8() (uint16, uint16, uint16, uint16, uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16s9() (uint16, uint16, uint16, uint16, uint16, uint16, uint16, uint16, uint16) {
	return Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16(), Uint16()
}

func Uint16sN(n int) []uint16 {
	ret := make([]uint16, n)
	for i := 0; i < n; i++ {
		ret[i] = Uint16()
	}
	return ret
}

func Uint32() uint32 {
	ret, _ := strconv.ParseUint(Word(), 10, 32)
	return uint32(ret)
}

func Uint32s() []uint32 {
	words := Words()
	n := len(words)
	ret := make([]uint32, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseUint(words[i], 10, 32)
		ret[i] = uint32(v)
	}
	return ret
}

func Uint32s2() (uint32, uint32) {
	return Uint32(), Uint32()
}

func Uint32s3() (uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32()
}

func Uint32s4() (uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32s5() (uint32, uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32s6() (uint32, uint32, uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32s7() (uint32, uint32, uint32, uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32s8() (uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32s9() (uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32, uint32) {
	return Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32(), Uint32()
}

func Uint32sN(n int) []uint32 {
	ret := make([]uint32, n)
	for i := 0; i < n; i++ {
		ret[i] = Uint32()
	}
	return ret
}

func Uint64() uint64 {
	ret, _ := strconv.ParseUint(Word(), 10, 64)
	return uint64(ret)
}

func Uint64s() []uint64 {
	words := Words()
	n := len(words)
	ret := make([]uint64, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseUint(words[i], 10, 64)
		ret[i] = uint64(v)
	}
	return ret
}

func Uint64s2() (uint64, uint64) {
	return Uint64(), Uint64()
}

func Uint64s3() (uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64()
}

func Uint64s4() (uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64s5() (uint64, uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64s6() (uint64, uint64, uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64s7() (uint64, uint64, uint64, uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64s8() (uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64s9() (uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64) {
	return Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64(), Uint64()
}

func Uint64sN(n int) []uint64 {
	ret := make([]uint64, n)
	for i := 0; i < n; i++ {
		ret[i] = Uint64()
	}
	return ret
}

func Float32() float32 {
	ret, _ := strconv.ParseFloat(Word(), 32)
	return float32(ret)
}

func Float32s() []float32 {
	words := Words()
	n := len(words)
	ret := make([]float32, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseFloat(words[i], 32)
		ret[i] = float32(v)
	}
	return ret
}

func Float32s2() (float32, float32) {
	return Float32(), Float32()
}

func Float32s3() (float32, float32, float32) {
	return Float32(), Float32(), Float32()
}

func Float32s4() (float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32()
}

func Float32s5() (float32, float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32(), Float32()
}

func Float32s6() (float32, float32, float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32(), Float32(), Float32()
}

func Float32s7() (float32, float32, float32, float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32()
}

func Float32s8() (float32, float32, float32, float32, float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32()
}

func Float32s9() (float32, float32, float32, float32, float32, float32, float32, float32, float32) {
	return Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32(), Float32()
}

func Float32sN(n int) []float32 {
	ret := make([]float32, n)
	for i := 0; i < n; i++ {
		ret[i] = Float32()
	}
	return ret
}

func Float64() float64 {
	ret, _ := strconv.ParseFloat(Word(), 64)
	return float64(ret)
}

func Float64s() []float64 {
	words := Words()
	n := len(words)
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		v, _ := strconv.ParseFloat(words[i], 64)
		ret[i] = float64(v)
	}
	return ret
}

func Float64s2() (float64, float64) {
	return Float64(), Float64()
}

func Float64s3() (float64, float64, float64) {
	return Float64(), Float64(), Float64()
}

func Float64s4() (float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64()
}

func Float64s5() (float64, float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64(), Float64()
}

func Float64s6() (float64, float64, float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64(), Float64(), Float64()
}

func Float64s7() (float64, float64, float64, float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64()
}

func Float64s8() (float64, float64, float64, float64, float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64()
}

func Float64s9() (float64, float64, float64, float64, float64, float64, float64, float64, float64) {
	return Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64(), Float64()
}

func Float64sN(n int) []float64 {
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		ret[i] = Float64()
	}
	return ret
}

func Words2() (string, string) {
	return Word(), Word()
}

func Words3() (string, string, string) {
	return Word(), Word(), Word()
}

func Words4() (string, string, string, string) {
	return Word(), Word(), Word(), Word()
}

func Words5() (string, string, string, string, string) {
	return Word(), Word(), Word(), Word(), Word()
}

func Words6() (string, string, string, string, string, string) {
	return Word(), Word(), Word(), Word(), Word(), Word()
}

func Words7() (string, string, string, string, string, string, string) {
	return Word(), Word(), Word(), Word(), Word(), Word(), Word()
}

func Words8() (string, string, string, string, string, string, string, string) {
	return Word(), Word(), Word(), Word(), Word(), Word(), Word(), Word()
}

func Words9() (string, string, string, string, string, string, string, string, string) {
	return Word(), Word(), Word(), Word(), Word(), Word(), Word(), Word(), Word()
}

func WordsN(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = Word()
	}
	return ret
}

func Lines2() (string, string) {
	return Line(), Line()
}

func Lines3() (string, string, string) {
	return Line(), Line(), Line()
}

func Lines4() (string, string, string, string) {
	return Line(), Line(), Line(), Line()
}

func Lines5() (string, string, string, string, string) {
	return Line(), Line(), Line(), Line(), Line()
}

func Lines6() (string, string, string, string, string, string) {
	return Line(), Line(), Line(), Line(), Line(), Line()
}

func Lines7() (string, string, string, string, string, string, string) {
	return Line(), Line(), Line(), Line(), Line(), Line(), Line()
}

func Lines8() (string, string, string, string, string, string, string, string) {
	return Line(), Line(), Line(), Line(), Line(), Line(), Line(), Line()
}

func Lines9() (string, string, string, string, string, string, string, string, string) {
	return Line(), Line(), Line(), Line(), Line(), Line(), Line(), Line(), Line()
}

func LinesN(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = Line()
	}
	return ret
}

func Bytes2() (byte, byte) {
	return Byte(), Byte()
}

func Bytes3() (byte, byte, byte) {
	return Byte(), Byte(), Byte()
}

func Bytes4() (byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte()
}

func Bytes5() (byte, byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte(), Byte()
}

func Bytes6() (byte, byte, byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte(), Byte(), Byte()
}

func Bytes7() (byte, byte, byte, byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte()
}

func Bytes8() (byte, byte, byte, byte, byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte()
}

func Bytes9() (byte, byte, byte, byte, byte, byte, byte, byte, byte) {
	return Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte(), Byte()
}

func BytesN(n int) []byte {
	ret := make([]byte, n)
	for i := 0; i < n; i++ {
		ret[i] = Byte()
	}
	return ret
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	nrTests, _ := strconv.Atoi(scanner.Text())
	for i := 0; i < nrTests; i++ {
		scanner.Scan()
		line := strings.Split(scanner.Text(), " ")
		a, _ := strconv.Atoi(line[0])
		b, _ := strconv.Atoi(line[1])
		c, _ := strconv.Atoi(line[2])
		x := math.Abs(float64(a - 1))
		y := math.Abs(float64(b-c)) + math.Abs(float64(c-1))
		if x < y {
			fmt.Println("1")
		} else if x > y {
			fmt.Println("2")
		} else {
			fmt.Println("3")
		}
	}
}

package main

import "fmt"

func main() {
	var t, a, b, c int
	fmt.Scanln(&t)
	for t > 0 {
		t--
		fmt.Scanln(&a, &b, &c)
		u := a - 1
		v := b - 1
		if c > b {
			v = c - b + c - 1
		}
		if u < v {
			fmt.Println(1)
		} else if u > v {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}

	}
}

package main

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

var (
	reader     = bufio.NewReader(os.Stdin)
	t, a, b, c int
)

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func solve(a, b, c int) int {
	var x, y = abs(a - 1), abs(b-c) + abs(c-1)
	if x < y {
		return 1
	}
	if x > y {
		return 2
	}
	return 3
}

func main() {
	fmt.Fscan(reader, &t)
	for ; t > 0; t-- {
		fmt.Fscan(reader, &a, &b, &c)

		fmt.Println(solve(a, b, c))
	}
}

package main

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

type CF1729A struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1729A) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1729A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1729A) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1729A) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1729A) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1729A
Date: 12/09/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1729/A
Problem: CF1729A
**/
func (in *CF1729A) Run() {
	for t := in.NextInt(); t > 0; t-- {
		a, b, c := in.NextInt(), in.NextInt(), in.NextInt()
		diffA := a

		diffB := int(math.Abs(float64(b)-float64(c))) + c
		if diffA == diffB {
			fmt.Println(3)
		} else if diffA < diffB {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

func NewCF1729A(r *bufio.Reader) *CF1729A {
	return &CF1729A{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1729A(bufio.NewReader(os.Stdin)).Run()
}

package main

import (
	"fmt"
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	var n, a, b, c int
	fmt.Scanln(&n)
	for i := 0; i < n; i++ {
		fmt.Scanln(&a, &b, &c)
		fst, scnd := a-1, max(b, c)-min(b, c)+(c-1)
		if fst < scnd {
			fmt.Println(1)
		} else if fst > scnd {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
	}
}

package main

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

func main() {
	var t int
	r := bufio.NewReader(os.Stdin)
	fmt.Fscanf(r, "%d\n", &t)
	for ; t > 0; t-- {
		a, b, c, time1, time2 := 0, 0, 0, 0, 0
		s, _ := r.ReadString('\n')
		p := strings.Fields(s)
		a, _ = strconv.Atoi(p[0])
		b, _ = strconv.Atoi(p[1])
		c, _ = strconv.Atoi(p[2])

		time1 = a - 1
		time2 = int(math.Abs(float64(c - b)))
		if c != 1 {
			time2 += c - 1
		}
		if time1 < time2 {
			fmt.Println("1")
		} else if time2 < time1 {
			fmt.Println("2")
		} else {
			fmt.Println("3")
		}
	}
}

package main

import (
    "fmt"
    "math"
)

func main () {
    var t int

    fmt.Scan(&t)

    for i := 0; i < t; i++ {
        var a, b, c float64
        fmt.Scan(&a)
        fmt.Scan(&b)
        fmt.Scan(&c)

        if math.Abs(a - 1) < math.Abs(b - c) + (c - 1) {
            fmt.Println(1)
        } else if math.Abs(a - 1) == math.Abs(b - c) + (c - 1) {
            fmt.Println(3)
        } else {
            fmt.Println(2)
        }
    }
}

/*
	A template for Go on codeforces.com
	Author: Yakov, frvr.ru
*/

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"strconv"
	"strings"
)

func main() {
	// START WRITING YOUR SOLUTION HERE:
	// writeLine(typeOf(readInt()))
	t := readInt()
	for j := 0; j < t; j++ {
		arr := readInts()
		cost_1 := math.Abs(float64(arr[0] - 1))
		cost_2 := math.Abs(float64(arr[1]-arr[2])) + math.Abs(float64(arr[2]-1))
		if cost_1 > cost_2 {
			writeLine(2)
		} else if cost_1 < cost_2 {
			writeLine(1)
		} else {
			writeLine(3)
		}
	}

}

/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */
/* ~~~~~~~~~~ */

var in = bufio.NewReader(os.Stdin)

type float = float32
type double = float64
type long = int64
type ulong = uint64

func typeOf(arg interface{}) string {
	switch reflect.TypeOf(arg).Kind() {
	case reflect.Int:
		return "int"
	case reflect.Int8:
		return "int8"
	case reflect.Int16:
		return "int16"
	case reflect.Int32:
		return "int32"
	case reflect.Int64:
		return "int64"
	case reflect.Uint:
		return "uint"
	case reflect.Uint8:
		return "uint8"
	case reflect.Uint16:
		return "uint16"
	case reflect.Uint32:
		return "uint32"
	case reflect.Uint64:
		return "uint64"
	case reflect.Float32:
		return "float32"
	case reflect.Float64:
		return "float64"
	case reflect.Complex64:
		return "complex64"
	case reflect.Complex128:
		return "complex128"
	case reflect.Bool:
		return "bool"
	case reflect.String:
		return "string"
	case reflect.Chan:
		return "chan"
	case reflect.Ptr:
		return "ptr"
	case reflect.Uintptr:
		return "uintptr"
	case reflect.UnsafePointer:
		return "unsafeptr"
	case reflect.Interface:
		return "interface"
	case reflect.Array:
		return "array"
	case reflect.Slice:
		return "slice"
	case reflect.Map:
		return "map"
	case reflect.Struct:
		return "struct"
	case reflect.Func:
		return "func"
	case reflect.Invalid:
		return "invalid"
	default:
		return "nil"
	}
}

/* ~~~~~~~~~~ */

func _scln() string {
	ln, _ := in.ReadString('\n')
	return strings.Trim(ln, " \r\n")
}
func _sc(s []string) string {
	if len(s) == 0 {
		return _scln()
	}
	return s[0]
}

func readLine() string              { return _scln() }
func readString() string            { return _scln() }
func readStrings() []string         { return strings.Split(_scln(), " ") }
func readBool(s ...string) bool     { t, _ := strconv.ParseBool(_sc(s)); return t }
func readByte(s ...string) byte     { t, _ := strconv.ParseUint(_sc(s), 10, 8); return byte(t) }
func readDouble(s ...string) double { t, _ := strconv.ParseFloat(_sc(s), 64); return t }
func readFloat(s ...string) float   { t, _ := strconv.ParseFloat(_sc(s), 32); return float32(t) }
func readInt(s ...string) int       { t, _ := strconv.Atoi(_sc(s)); return t }
func readLong(s ...string) long     { t, _ := strconv.ParseInt(_sc(s), 10, 64); return t }
func readULong(s ...string) ulong   { t, _ := strconv.ParseUint(_sc(s), 10, 64); return t }

/* ~~~~~~~~~~ */

// Too much overhead with universal method using interface{}, wait for the generics,
// but for now — just don't look at the redundancy of the code after that commentary :)

func readBools() []bool {
	strs := readStrings()
	arr := make([]bool, len(strs))
	for i, s := range strs {
		arr[i] = readBool(s)
	}
	return arr
}
func readBytes() []byte {
	strs := readStrings()
	arr := make([]byte, len(strs))
	for i, s := range strs {
		arr[i] = readByte(s)
	}
	return arr
}
func readDoubles() []double {
	strs := readStrings()
	arr := make([]double, len(strs))
	for i, s := range strs {
		arr[i] = readDouble(s)
	}
	return arr
}
func readFloats() []float {
	strs := readStrings()
	arr := make([]float, len(strs))
	for i, s := range strs {
		arr[i] = readFloat(s)
	}
	return arr
}
func readInts() []int {
	strs := readStrings()
	arr := make([]int, len(strs))
	for i, s := range strs {
		arr[i] = readInt(s)
	}
	return arr
}
func readLongs() []long {
	strs := readStrings()
	arr := make([]long, len(strs))
	for i, s := range strs {
		arr[i] = readLong(s)
	}
	return arr
}
func readULongs() []ulong {
	strs := readStrings()
	arr := make([]ulong, len(strs))
	for i, s := range strs {
		arr[i] = readULong(s)
	}
	return arr
}

/* ~~~~~~~~~~ */

func write(arg ...interface{})                 { fmt.Print(arg...) }
func writeLine(arg ...interface{})             { fmt.Println(arg...) }
func writeFormat(f string, arg ...interface{}) { fmt.Printf(f, arg...) }

package main

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

var (
	in  = bufio.NewReader(os.Stdin)
	out = bufio.NewWriter(os.Stdout)
)

func main() {

	defer out.Flush()

	t := 0
	if _, err := fmt.Fscan(in, &t); err != nil {
		return
	}

	for ; t > 0; t-- {
		a, b, c := 0, 0, 0
		if _, err := fmt.Fscan(in, &a, &b, &c); err != nil {
			return
		}
		first := a - 1
		second := 0
		if b > c {
			second = b - 1
		} else {
			second = c - b + c - 1
		}
		if first < second {
			fmt.Println(1)
		} else if first > second {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		//fmt.Fprintln(out, "...")
	}
}

package main

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

func main() {
	// f, err := os.OpenFile("data.txt", os.O_RDONLY, 0644)
	// if err != nil {
	// 	os.Exit(-2)
	// }

	// r := bufio.NewReader(f)
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	Solve(r, w, w.Flush)
}

func Solve(reader io.Reader, writer io.Writer, Flush func() error) {
	var t int
	fmt.Fscanln(reader, &t)

	for ; t > 0; t-- {
		var a, b, c int
		fmt.Fscanln(reader, &a, &b, &c)

		ans := 3
		a = a - 1
		v := (c - 1) + Abs(b-c)
		if a < v {
			ans = 1
		} else if a > v {
			ans = 2
		}

		fmt.Fprintln(writer, ans)
		Flush()
	}
}

func Abs(n int) int {
	if n > 0 {
		return n
	}
	return -n
}

package main

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

func main() {
	in, out := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var tests = 1
	Fscan(in, &tests)

	var run_case func()
	run_case = func() {
		var a, b, c int
		Fscan(in, &a, &b, &c)
		f := a - 1
		s := abs(c, b) + (c - 1)
		if f == s {
			Fprintln(out, 3)
		} else if f < s {
			Fprintln(out, 1)
		} else {
			Fprintln(out, 2)
		}

	}

	for i := 0; i < tests; i++ {
		run_case()
	}
}
func abs(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var a, b, c int
		fmt.Fscan(in, &a, &b, &c)

		if b < c {
			b = c - b + c
		}

		if a == b {
			fmt.Fprintln(out, 3)
		} else if a < b {
			fmt.Fprintln(out, 1)
		} else {
			fmt.Fprintln(out, 2)
		}
	}
}

package main

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

var in, out = bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)

func solve() string {
	var a, b, c int
	fmt.Fscan(in, &a, &b, &c)

	s := abs(c-b) + c
	if a < s {
		return "1"
	}
	if a > s {
		return "2"
	}

	return "3"
}

func main() {
	defer out.Flush()
	var t int
	for fmt.Fscanln(in, &t); t > 0; t-- {
		fmt.Fprintln(out, solve())
	}
}

// util functions
func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func makeMatrix(n, m int) [][]int {
	x := make([][]int, n)
	for i := range x {
		x[i] = make([]int, m)
	}
	return x
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		arr := readArrInt64()
		a, b, c := arr[0], arr[1], arr[2]
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(a, b, c)
			continue
		}
	}
}

func abs(i int64) int64 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

func readArrString() []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readArrInt64() []int64 {
	numbs := readArrString()
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}
	return arr
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int64
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(a, b, c)
			continue
		}
	}
}

func abs(i int64) int64 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int32
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(a, b, c)
			continue
		}
	}
}

func abs(i int32) int32 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int32
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(t1, t2)
			continue
		}
	}
}

func abs(i int32) int32 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int32
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(33)
			continue
		}
	}
}

func abs(i int32) int32 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int32
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
			continue
		case t1 > t2:
			fmt.Println(2)
			continue
		case t1 == t2:
			fmt.Println(3)
			continue
		}
	}
}

func abs(i int32) int32 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readLineNumbs() []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

func readArrInt64() []int64 {
	numbs := readLineNumbs()
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}
	return arr
}

package main

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

func main() {
	t := readInt64()
	for i := int64(0); i < t; i++ {
		var a, b, c int32
		_, _ = fmt.Fscanf(os.Stdin, "%d %d %d\n", &a, &b, &c)
		t1 := a - 1
		t2 := abs(b-c) + c - 1
		switch {
		case t1 < t2:
			fmt.Println(1)
		case t1 > t2:
			fmt.Println(2)
		case t1 == t2:
			fmt.Println(3)
		}
	}
}

func abs(i int32) int32 {
	if i > 0 {
		return i
	} else {
		return -i
	}
}

var in = bufio.NewReader(os.Stdin)

func readLineNumbs() []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readInt64() int64 {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.ParseInt(nStr, 10, 64)
	return n
}

func readArrInt64() []int64 {
	numbs := readLineNumbs()
	arr := make([]int64, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.ParseInt(n, 10, 64)
		arr[i] = val
	}
	return arr
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t float64
	fmt.Scanf("%d\n", &t)
	var i float64
	for i = 0; i < t; i++ {
		var a, b, c float64
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		a--
		r := math.Abs(b-c) + c - 1
		if r == a {
			fmt.Println(3)
		} else if r > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int64
	fmt.Scanf("%d", &t)
	for i := 0; int64(i) < t; i++ {
		var a, b, c int64
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		a--
		r := int64(math.Abs(float64(b-c))) + c - 1
		if r == a {
			fmt.Println(3)
		} else if r > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int64
	fmt.Scanf("%d", &t)
	for i := 0; int64(i) < t; i++ {
		var a, b, c int64
		fmt.Scanf("%d %d %d", &a, &b, &c)
		a--
		r := int64(math.Abs(float64(b-c))) + c - 1
		if r == a {
			fmt.Println(3)
		} else if r > a {
			fmt.Println(1)
		} else {
			fmt.Println(2)
		}
	}
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if b >= c {
			if a-1 > b-1 {
				fmt.Println(2)
			} else if a-1 == b-1 {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		} else {
			if a-1 > ((c-b)*2)-1 {
				fmt.Println(2)
			} else if a-1 == ((c-b)*2)-1 {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		}
	}
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if b >= c {
			if a-1 > b-1 {
				fmt.Println(2)
			} else if a-1 == b-1 {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		} else {
			if a-1 > ((c-b)*2)+1 {
				fmt.Println(2)
			} else if a-1 == ((c-b)*2)+1 {
				fmt.Println(3)
			} else {
				fmt.Println(1)
			}
		}
	}
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if a-1 == abs(c-b)*2 {
			fmt.Println(3)
		} else {
			if a-1 < (c-b)*2 {
				fmt.Println(1)
			} else {
				fmt.Println(2)
			}
		}
	}
}
func abs(x int) int {
	var result int
	if x > 0 {
		result = x
	} else {
		if x < 0 {
			result = x*-1
		}
	}
	return result
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if a-1 == (c-b)*2 {
			fmt.Println(3)
		} else {
			if a-1 < (c-b)*2 {
				fmt.Println(1)
			} else {
				fmt.Println(2)
			}
		}
	}
}

package main
import(
    "fmt"
)
func main(){
	var t int
	fmt.Scan(&t)
	for i:=0;i<3;i++{
		var a,b,c int
		fmt.Scan(&a,&b,&c)
		if a-1 == (c-b)*2 {
			fmt.Println(3)
		} else {
			if a-1 < (c-b)*2 {
				fmt.Println(1)
			} else {
				fmt.Println(2)
			}
		}
	}
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int
	fmt.Scan(&t)
	for t > 0 {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		// fmt.Println(a,b,c)
		if a-1 < int(math.Abs(float64(c-b))+math.Abs(float64(c)-1)) {
			fmt.Println(1)
		} else if a-1 > int(math.Abs(float64(a-b))+math.Abs(float64(c)-1)) {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		t--
	}
}

// 1 2 1

package main

import (
	"fmt"
	"math"
)

func main() {
	var t int
	fmt.Scan(&t)
	for t > 0 {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		// fmt.Println(a,b,c)
		if a-1 < int(math.Abs(float64(a-b))+math.Abs(float64(c)-1)) {
			fmt.Println(1)
		} else if a-1 > int(math.Abs(float64(a-b))+math.Abs(float64(c)-1)) {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		t--
	}
}

// 1 2 1

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scan(&t)
	for t > 0 {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		// fmt.Println(a,b,c)
		if a-1 < (c-b)+(c-1) {
			fmt.Println(1)
		} else if a-1 > (c-b)+(c-1) {
			fmt.Println(2)
		} else {
			fmt.Println(3)
		}
		t--
	}
}

package main

import (
	"fmt"
)

func abs(a int) int {
	if a < 0 {
		a = -a
	}
	return a
}

func min(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func main() {
	var t, a, b, c int
	_, _ = fmt.Scanln(&t)

	for i := 0; i < t; i++ {
		_, _ = fmt.Scanln(&a, &b, &c)
		fmt.Println(min(abs(a - 1), abs(b - c) + abs(c - 1)) + 1)
	}
}

package main

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

func ScanInt(scanner *bufio.Scanner) int {
	if !scanner.Scan() {
		panic("nothing to scan")
	}
	str := scanner.Text()
	n, err := strconv.Atoi(str)
	if err != nil {
		panic(err)
	}
	return n
}

const whitespaceSymbols = "\t\n\v\f\r "

func splitFunc(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}

	i := bytes.IndexAny(data, whitespaceSymbols)
	if i > 0 {
		return i + 1, data[:i], nil
	}
	if i == -1 {
		if atEOF {
			return len(data), data, nil
		}
		return 0, nil, nil
	}

	trimmed := bytes.TrimLeft(data, whitespaceSymbols)
	advance = len(data) - len(trimmed)
	if atEOF && len(trimmed) != 0 {
		trimmed = trimmed[:bytes.IndexAny(trimmed, whitespaceSymbols)]
		return advance + len(trimmed), trimmed, nil
	}
	return advance, nil, nil
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(nil, 1<<30)
	scanner.Split(splitFunc)
	t := ScanInt(scanner)
	for i := 0; i < t; i++ {
		a := ScanInt(scanner)
		b := ScanInt(scanner)
		c := ScanInt(scanner)
		if b > c {
			switch {
			case a < c:
				fmt.Println(1)
			case a == c:
				fmt.Println(3)
			default:
				fmt.Println(2)
			}
			continue
		}
		switch {
		case a-1 < c-b+c-1:
			fmt.Println(1)
		case a-1 == c-b+c-1:
			fmt.Println(3)
		default:
			fmt.Println(2)
		}
	}
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanf("%d", &t)
	for i := 0; i < t; i++ {
		var a, b, c int
		fmt.Scanf("%d %d %d", &a, &b, &c)
		if b > c {
			switch {
			case a < c:
				fmt.Println(1)
			case a == c:
				fmt.Println(3)
			default:
				fmt.Println(2)
			}
			continue
		}
		switch {
		case a-1 < c-b+c-1:
			fmt.Println(1)
		case a-1 == c-b+c-1:
			fmt.Println(3)
		default:
			fmt.Println(2)
		}
	}
}

package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"strconv"
	"strings"
	"sync"
	"time"
)

func main() {
	data, _ := ioutil.ReadAll(os.Stdin)
	ctroki := strings.Split(string(data), "\r\n")
	n, _ := strconv.Atoi(ctroki[0])
	pos := 1

	var wg sync.WaitGroup
	wg.Add(n)
	ch := make(chan struct{})

	go func() {
		wg.Wait()
		close(ch)
	}()
	timeout := 5 * time.Second

	output := make([]string, n)
	for i := 0; i < n; i++ {
		if ctroki[pos] == "" {
			continue
		}
		go atomicTotal(&output[i], ctroki[pos], &wg)

		pos = pos + 1
	}
	select {
	case <-time.After(timeout):
		fmt.Println(strings.Join(output, "\n"))
	case <-ch:
		fmt.Println(strings.Join(output, "\n"))
	}

}

func atomicTotal(output *string, nabor string, wg *sync.WaitGroup) {
	defer wg.Done()
	arr := strings.Split(nabor, " ")

	n1 := atoi(arr[0])
	n2 := atoi(arr[1])
	n3 := atoi(arr[2])

	if n1 == 1 || n3-n2+n3-1 > n1-1 {
		*output = fmt.Sprint(1)
	} else if n3-n2+n3-1 < n1-1 {
		*output = fmt.Sprint(2)
	} else {
		*output = fmt.Sprint(3)
	}

}

func atoi(str string) int64 {
	var n int64
	for i := 0; i < len(str); i++ {
		var char byte = '0'
		s := str[i]
		c := 0
		for s != char {
			char++
			c++
		}
		n = n*10 + int64(c)
	}
	return n
}

package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"strconv"
	"strings"
	"sync"
	"time"
)

func main() {
	data, _ := ioutil.ReadAll(os.Stdin)
	ctroki := strings.Split(string(data), "\r\n")
	n, _ := strconv.Atoi(ctroki[0])
	pos := 1

	var wg sync.WaitGroup
	wg.Add(n)
	ch := make(chan struct{})

	go func() {
		wg.Wait()
		close(ch)
	}()
	timeout := 5 * time.Second

	output := make([]string, n)
	for i := 0; i < n; i++ {
		if ctroki[pos] == "" {
			continue
		}
		go atomicTotal(&output[i], ctroki[pos], &wg)

		pos = pos + 1
	}
	select {
	case <-time.After(timeout):
		fmt.Println(strings.Join(output, "\n"))
	case <-ch:
		fmt.Println(strings.Join(output, "\n"))
	}

}

func atomicTotal(output *string, nabor string, wg *sync.WaitGroup) {
	defer wg.Done()
	arr := strings.Split(nabor, " ")

	n1 := atoi(arr[0])
	n2 := atoi(arr[1])
	n3 := atoi(arr[2])

	if n3-n2+n3-1 > n1-1 {
		*output = fmt.Sprint(1)
	} else if n3-n2+n3-1 < n1-1 {
		*output = fmt.Sprint(2)
	} else {
		*output = fmt.Sprint(3)
	}

}

func atoi(str string) int64 {
	var n int64
	for i := 0; i < len(str); i++ {
		var char byte = '0'
		s := str[i]
		c := 0
		for s != char {
			char++
			c++
		}
		n = n*10 + int64(c)
	}
	return n
}

package main

import (
	"fmt"
)

func abs(x int) int {
	if (x < 0) {
		return -x;
	} else {
		return x;
	}
}

func main() {
	var N int;
	fmt.Scan(&N);

	for T := 0; T < N; T++ {
		var a, b, c int;
		fmt.Scan(&a, &b, &c);
		x := a - 1;
		y := abs(b - c) + c - 1;
		if (x < y) {
			println(1);
		} else if (x > y) {
			println(2);
		} else {
			println(3);
		}
	}
}

// cf1729a project main.go
package main

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

func main() {
	r := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var t int
	fmt.Fscanf(r, "%d", &t)
	for i := 0; i < t; i++ {
		var a, b, c int64
		fmt.Fscanf(r, "%d %d %d", &a, &b, &c)
		var x int64 = 0
		if b > c {
			x = b
		} else {
			x = c + c - b
		}
		var r int64 = 3
		if a < x {
			r = 1
		} else if a > x {
			r = 2
		}
		fmt.Fprintln(w, r)
	}
}

package main

import "fmt"

func main() {

	var tc int

	fmt.Scanf("%d", &tc)

	for t := 1; t <= tc; t++ {
		var a, b, c int
		fmt.Scanf("%d %d %d", &a, &b, &c)
		if b < c {
			b = (c - b) + c
		}
		ans := 0
		if a < b {
			ans = 1
		}
		if a > b {
			ans = 2
		}
		if a == b {
			ans = 3
		}
		fmt.Println(ans)
	}

}


Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he decided to go with just two commands: cd (change the current directory) and pwd (display the current directory).Directories in Vasya's operating system form a traditional hierarchical tree structure. There is a single root directory, denoted by the slash character "/". Every other directory has a name — a non-empty string consisting of lowercase Latin letters. Each directory (except for the root) has a parent directory — the one that contains the given directory. It is denoted as "..".The command cd takes a single parameter, which is a path in the file system. The command changes the current directory to the directory specified by the path. The path consists of the names of directories separated by slashes. The name of the directory can be "..", which means a step up to the parent directory. «..» can be used in any place of the path, maybe several times. If the path begins with a slash, it is considered to be an absolute path, that is, the directory changes to the specified one, starting from the root. If the parameter begins with a directory name (or ".."), it is considered to be a relative path, that is, the directory changes to the specified directory, starting from the current one.The command pwd should display the absolute path to the current directory. This path must not contain "..".Initially, the current directory is the root. All directories mentioned explicitly or passed indirectly within any command cd are considered to exist. It is guaranteed that there is no attempt of transition to the parent directory of the root directory.

The first line of the input data contains the single integer n (1 ≤ n ≤ 50) — the number of commands. Then follow n lines, each contains one command. Each of these lines contains either command pwd, or command cd, followed by a space-separated non-empty parameter. The command parameter cd only contains lower case Latin letters, slashes and dots, two slashes cannot go consecutively, dots occur only as the name of a parent pseudo-directory. The command parameter cd does not end with a slash, except when it is the only symbol that points to the root directory. The command parameter has a length from 1 to 200 characters, inclusive. Directories in the file system can have the same names.

For each command pwd you should print the full absolute path of the given directory, ending with a slash. It should start with a slash and contain the list of slash-separated directories in the order of being nested from the root to the current folder. It should contain no dots.

7
pwd
cd /home/vasya
pwd
cd ..
pwd
cd vasya/../petya
pwd

package main

import (
	"fmt"
	"strings"
)

type FilePath []string

func (fp *FilePath) Process(path string) {
	if path[0] == '/' {
		fp.clear()
	}

	tokens := strings.Split(strings.TrimPrefix(strings.TrimSuffix(path, "/"), "/"), "/")
	for _, token := range tokens {
		switch token {
		case "..":
			*fp = (*fp)[:len(*fp)-1]
		case ".":
			continue
		default:
			*fp = append(*fp, token)
		}
	}
}

func (fp *FilePath) clear() {
	*fp = (*fp)[:0]
}

func (fp *FilePath) String() string {
	str := "/" + strings.Join(*fp, "/")
	if str != "/" {
		str += "/"
	}
	return str
}

var (
	n        int
	command  string
	path     string
	filePath *FilePath
)

func main() {
	filePath = new(FilePath)
	fmt.Scan(&n)
	for n > 0 {
		fmt.Scan(&command)
		switch command {
		case "pwd":
			fmt.Println(filePath)
		case "cd":
			fmt.Scan(&path)
			filePath.Process(path)
		}
		n--
	}
}

package main
import (
	"fmt"
	"unicode/utf8"
)
func main() {
	var a,p,temp string
	p = "/"
	var n int
	fmt.Scan(&n)
	for i:=0;i<n;i++ {
		fmt.Scan(&a)
		if a=="cd" {
			fmt.Scan(&a)
			a+="/"
			lena:= utf8.RuneCountInString(a)
			for j:=0;j<lena;j++ {
				temp+=string(a[j])
				if string(a[j])==string("/") {
					if temp==string("/") {
						p=temp
					} else if temp==string("../") {
						lenp:=utf8.RuneCountInString(p)-1
						for k:=lenp;;k-- {
							if k==0 {
								break
							}
							if string(p[k-1])==string("/") {
								break
							} else {lenp--}
						}
						p=p[0:lenp]
					} else {
						p+=temp
					}
					temp=string("")
				}
			}
		} else { fmt.Println(p)}
	}
}

package main

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

const PWD, CD, PRE_MAKR, CUR_MAKR, SEP_MARK string = "pwd", "cd", "..", ".", "/"

var in = bufio.NewScanner(os.Stdin)

func main() {
  in.Scan()
  n, _ := strconv.Atoi(in.Text())

  curPath := make([]string, 1, 200)
  curPath[0] = ""

  for i := 0; i < n; i++ {
    in.Scan()
    cmd := in.Text()
    if cmd == PWD {
      printPath(curPath)
    } else {
      cdPath := cmd[3:len(cmd)]
      path := strings.Split(cdPath, SEP_MARK)
      for j := 0; j < len(path); j++ {
        if path[j] == "" {
          curPath = path[0:1]
        } else if path[j] == ".." {
          curPath = curPath[0 : len(curPath)-1]
        } else {
          curPath = append(curPath, path[j])
        }
      }
    }
  }
}

func printPath(path []string) {
  len := len(path)
  for i := 0; i < len; i++ {
    fmt.Printf("%s%s", path[i], SEP_MARK)
  }
  fmt.Printf("\n")
}

package main

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

const PWD, PRE_MAKR, SEP_MARK string = "pwd", "..", "/"

var in = bufio.NewScanner(os.Stdin)

func main() {
  in.Scan()
  n, _ := strconv.Atoi(in.Text())

  curPath := make([]string, 1, 200)
  curPath[0] = ""

  for i := 0; i < n; i++ {
    in.Scan()
    cmd := in.Text()
    if cmd == PWD {
      printPath(curPath)
    } else {
      cdPath := cmd[3:len(cmd)]
      path := strings.Split(cdPath, SEP_MARK)
      for j := 0; j < len(path); j++ {
        if path[j] == "" {
          curPath = path[0:1]
        } else if path[j] == PRE_MAKR {
          curPath = curPath[0 : len(curPath)-1]
        } else {
          curPath = append(curPath, path[j])
        }
      }
    }
  }
}

func printPath(path []string) {
  len := len(path)
  for i := 0; i < len; i++ {
    fmt.Printf("%s%s", path[i], SEP_MARK)
  }
  fmt.Printf("\n")
}

package main

import "fmt"

func main() {
    var n int
    var cmd, s string
    dir := []string{"/"}
    fmt.Scan(&n)
    for i := 0; i < n; i++ {
        fmt.Scan(&cmd)
        if cmd == "pwd" {
            for _, v := range dir {
                fmt.Print(v)
            }
            fmt.Println()
        } else {
            fmt.Scan(&s)
            in := 0
            if s[0] == '/' {
                dir = dir[0:1]
                in++
            }
            for ; in < len(s); in++ {
                temp_s := ""
                for ; s[in] != '/'; in++ {
                    temp_s += string(s[in])
                    if (in+1) == len(s) { break }
                }
                if temp_s == ".." {
                    dir = dir[0:len(dir)-1]
                } else {
                    dir = append(dir,temp_s+"/")
                }
            }
        }
    }
}

package main

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

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

	var n int
	fmt.Fscanf(r, "%d\n", &n)

	cur := []string{""}
	for i := 0; i < n; i++ {
		var cmd string
		fmt.Fscanf(r, "%s", &cmd)
		switch cmd {
		case "pwd":
			fmt.Fscanf(r, "\n")
			fmt.Println(strings.Join(cur, "/") + "/")
		case "cd":
			p, _ := r.ReadString('\n')
			p = p[1 : len(p)-2]
			if p[0] == '/' {
				cur = nil
			}
			for _, t := range strings.Split(p, "/") {
				if t == ".." {
					cur = cur[:len(cur)-1]
				} else {
					cur = append(cur, t)
				}
			}
		}
	}
}

package main

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

const PWD, CD, PRE_MAKR, CUR_MAKR, SEP_MARK string = "pwd", "cd", "..", ".", "/"

var in = bufio.NewScanner(os.Stdin)

func main() {
  in.Scan()
  n, _ := strconv.Atoi(in.Text())

  curPath := make([]string, 1, 200)
  curPath[0] = ""

  for i := 0; i < n; i++ {
    in.Scan()
    cmd := in.Text()
    if cmd == PWD {
      printPath(curPath)
    } else {
      cdPath := cmd[3:len(cmd)]
      path := strings.Split(cdPath, SEP_MARK)
      if path[0] == "" {
        curPath = path
      } else {
        for j := 0; j < len(path); j++ {
          if path[j] == ".." {
            curPath = curPath[0 : len(curPath)-1]
          } else {
            curPath = append(curPath, path[j])
          }
        }
      }
    }
  }
}

func printPath(path []string) {
  fmt.Printf("%s", SEP_MARK)
  len := len(path)
  for i := 1; i < len; i++ {
    if i == len-1 || path[i+1] == "" {
      fmt.Printf("%s", path[i])
      break
    }
    fmt.Printf("%s%s", path[i], SEP_MARK)
  }
  fmt.Printf("\n")
}

package main

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

const PWD, CD, PRE_MAKR, CUR_MAKR, SEP_MARK string = "pwd", "cd", "..", ".", "/"

var in = bufio.NewScanner(os.Stdin)

func main() {
  in.Scan()
  n, _ := strconv.Atoi(in.Text())

  curPath := make([]string, 1, 200)
  curPath[0] = ""

  for i := 0; i < n; i++ {
    in.Scan()
    cmd := in.Text()
    if cmd == PWD {
      printPath(curPath)
    } else {
      cdPath := cmd[3:len(cmd)]
      path := strings.Split(cdPath, SEP_MARK)
      for j := 0; j < len(path); j++ {
        if path[j] == "" {
        } else if path[j] == ".." {
          curPath = curPath[0 : len(curPath)-1]
        } else {
          curPath = append(curPath, path[j])
        }
      }
    }
  }
}

func printPath(path []string) {
  len := len(path)
  for i := 0; i < len; i++ {
    fmt.Printf("%s%s", path[i], SEP_MARK)
  }
  fmt.Printf("\n")
}

package main

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

const PWD, CD, PRE_MAKR, CUR_MAKR, SEP_MARK string = "pwd", "cd", "..", ".", "/"

var in = bufio.NewScanner(os.Stdin)

func main() {
  in.Scan()
  n, _ := strconv.Atoi(in.Text())

  curPath := make([]string, 1, 200)
  curPath[0] = ""

  for i := 0; i < n; i++ {
    in.Scan()
    cmd := in.Text()
    if cmd == PWD {
      printPath(curPath)
    } else {
      cdPath := cmd[3:len(cmd)]
      path := strings.Split(cdPath, SEP_MARK)
      if path[0] == "" {
        curPath = path
      } else {
        for j := 0; j < len(path); j++ {
          if path[j] == ".." {
            curPath = curPath[0 : len(curPath)-1]
          } else {
            curPath = append(curPath, path[j])
          }
        }
      }
    }
  }
}

func printPath(path []string) {
  fmt.Printf("%s", SEP_MARK)
  len := len(path)
  for i := 1; i < len; i++ {
    fmt.Printf("%s%s", path[i], SEP_MARK)
  }
  fmt.Printf("\n")
}

package main

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

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

	var n int
	fmt.Fscanf(r, "%d\n", &n)

	cur := []string{""}
	for i := 0; i < n; i++ {
		var cmd string
		fmt.Fscanf(r, "%s", &cmd)
		switch cmd {
		case "pwd":
			fmt.Fscanf(r, "\n")
			fmt.Println(strings.Join(cur, "/") + "/")
		case "cd":
			p, _ := r.ReadString('\n')
			p = p[1 : len(p)-1]
			if p[0] == '/' {
				cur = nil
			}
			for _, t := range strings.Split(p, "/") {
				if t == ".." {
					cur = cur[:len(cur)-1]
				} else {
					cur = append(cur, t)
				}
			}
		}
	}
}