There are two infinite sources of water:

  * hot water of temperature h; 
  * cold water of temperature c (c < h). 



You perform the following procedure of alternating moves:

  1. take one cup of the hot water and pour it into an infinitely deep barrel; 
  2. take one cup of the cold water and pour it into an infinitely deep barrel; 
  3. take one cup of the hot water ... 
  4. and so on ... 



Note that you always start with the cup of hot water.

The barrel is initially empty. You have to pour at least one cup into the barrel. The water temperature in the barrel is an average of the temperatures of the poured cups.

You want to achieve a temperature as close as possible to t. So if the temperature in the barrel is t_b, then the absolute difference of t_b and t (|t_b - t|) should be as small as possible.

How many cups should you pour into the barrel, so that the temperature in it is as close as possible to t? If there are multiple answers with the minimum absolute difference, then print the smallest of them.

Input

The first line contains a single integer T (1 ≤ T ≤ 3 ⋅ 10^4) — the number of testcases.

Each of the next T lines contains three integers h, c and t (1 ≤ c < h ≤ 10^6; c ≤ t ≤ h) — the temperature of the hot water, the temperature of the cold water and the desired temperature in the barrel.

Output

For each testcase print a single positive integer — the minimum number of cups required to be poured into the barrel to achieve the closest temperature to t.

Example

Input


3
30 10 20
41 15 30
18 13 18


Output


2
7
1

Note

In the first testcase the temperature after 2 poured cups: 1 hot and 1 cold is exactly 20. So that is the closest we can achieve.

In the second testcase the temperature after 7 poured cups: 4 hot and 3 cold is about 29.857. Pouring more water won't get us closer to t than that.

In the third testcase the temperature after 1 poured cup: 1 hot is 18. That's exactly equal to t.
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

import static java.lang.Math.abs;

public class C_rational {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int test = in.nextInt();
        for (int t = 1; t <= test; t++) {
            long h = in.nextInt(), c = in.nextInt(), temp = in.nextInt();
            Rational TEMP = new Rational(temp, 1);
            long lowerEqual = lowerOrEqual(h, c, temp);
            long greaterEqual = greaterOrEqual(h, c, temp);
            Rational lowerTemp = calcTemp(lowerEqual, h, c), higherTemp = calcTemp(greaterEqual, h, c);
            Rational tempFor2 = calcTemp(2, h, c);
            Pair pair[] = new Pair[3];
            pair[0] = new Pair((TEMP.sub(tempFor2)).abs(), 2);
            pair[1] = new Pair((TEMP.sub(lowerTemp)).abs(), lowerEqual);
            pair[2] = new Pair((TEMP.sub(higherTemp)).abs(), greaterEqual);
            Arrays.sort(pair);
            pw.println(pair[0].s);
        }

        pw.close();
    }


    static Rational calcTemp(long moves, long h, long c) {
        long temp = h * (moves / 2);
        if (moves % 2 == 1) temp += h;
        temp += c * (moves / 2);
        return new Rational(temp, moves);
    }

    static long lowerOrEqual(long h, long c, long t) {
        long l = 0, r = (long) 1e7, res = r;
        Rational TEMP = new Rational(t, 1);
        while (l <= r) {
            long mid = (l + r) / 2;
            long moves = (mid * 2) + 1;
            Rational temp = calcTemp(moves, h, c);
            if (temp.compareTo(TEMP) <= 0) {
                res = moves;
                r = mid - 1;
            } else {
                l = mid + 1;
            }
        }
        return res;
    }

    static long greaterOrEqual(long h, long c, long t) {
        long l = 0, r = (long) 1e7, res = r;
        Rational TEMP = new Rational(t, 1);
        while (l <= r) {
            long mid = (l + r) / 2;
            long moves = (mid * 2) + 1;
            Rational temp = calcTemp(moves, h, c);
            if (temp.compareTo(TEMP) >= 0) {
                res = moves;
                l = mid + 1;
            } else {
                r = mid - 1;
            }
        }
        return res;
    }

    static class Pair implements Comparable<Pair> {
        Rational f;
        long s;

        Pair(Rational F, long S) {
            f = F;
            s = S;
        }

        public int compareTo(Pair p) {
            int cmp =  f.compareTo(p.f);
            if(cmp != 0) return cmp;
            return Long.compare(s, p.s);
        }

        public String toString() {
            return f + " " + s;
        }
    }

    static class Rational implements Comparable<Rational> {
        static final Rational ZERO = new Rational(0, 1);

        long num, den;

        public Rational(long numerator, long denominator) {
            long g = gcd(numerator, denominator);
            num = numerator / g;
            den = denominator / g;

            // needed only for negative numbers
            if (den < 0) {
                den = -den;
                num = -num;
            }
        }

        // return the numerator and denominator of (this)
        public long numerator() {
            return num;
        }

        public long denominator() {
            return den;
        }

        // return double precision representation of (this)
        public double toDouble() {
            return (double) num / den;
        }

        // return string representation of (this)
        public String toString() {
            if (den == 1) return num + "";
            else return num + "/" + den;
        }

        // return { -1, 0, +1 } if a < b, a = b, or a > b
        public int compareTo(Rational b) {
            Rational a = this;
            BigInteger x = BigInteger.valueOf(a.num).multiply(BigInteger.valueOf(b.den)),
                    y = BigInteger.valueOf(a.den).multiply(BigInteger.valueOf(b.num));
            return x.compareTo(y);
        }

        // is this Rational object equal to y?
        public boolean equals(Object y) {
            if (y == null) return false;
            if (y.getClass() != this.getClass()) return false;
            Rational b = (Rational) y;
            return compareTo(b) == 0;
        }

        // hashCode consistent with equals() and compareTo()
        // (better to hash the numerator and denominator and combine)
        public int hashCode() {
            return this.toString().hashCode();
        }


        // create and return a new rational (r.num + s.num) / (r.den + s.den)
        public static Rational median(Rational r, Rational s) {
            return new Rational(r.num + s.num, r.den + s.den);
        }

        // return gcd(|m|, |n|)

        private static long gcd(long m, long n) {
            if (m < 0) m = -m;
            if (n < 0) n = -n;
            if (0 == n) return m;
            else return gcd(n, m % n);
        }

        // return lcm(|m|, |n|)
        private static long lcm(long m, long n) {
            if (m < 0) m = -m;
            if (n < 0) n = -n;
            return m * (n / gcd(m, n));    // parentheses important to avoid overflow
        }

        // return a * b, staving off overflow as much as possible by cross-cancellation
        public Rational multiply(Rational b) {
            Rational a = this;

            // reduce p1/q2 and p2/q1, then multiply, where a = p1/q1 and b = p2/q2
            Rational c = new Rational(a.num, b.den);
            Rational d = new Rational(b.num, a.den);
            return new Rational(c.num * d.num, c.den * d.den);
        }


        // return a + b, staving off overflow
        public Rational add(Rational b) {
            Rational a = this;

            // special cases
            if (a.compareTo(ZERO) == 0) return b;
            if (b.compareTo(ZERO) == 0) return a;

            // Find gcd of numerators and denominators
            long f = gcd(a.num, b.num);
            long g = gcd(a.den, b.den);

            // add cross-product terms for numerator
            Rational s = new Rational((a.num / f) * (b.den / g) + (b.num / f) * (a.den / g),
                    lcm(a.den, b.den));

            // multiply back in
            s.num *= f;
            return s;
        }

        // return -a
        public Rational negate() {
            return new Rational(-num, den);
        }

        // return |a|
        public Rational abs() {
            if (num >= 0) return this;
            else return negate();
        }

        // return a - b
        public Rational sub(Rational b) {
            Rational a = this;
            return a.add(b.negate());
        }


        public Rational reciprocal() {
            return new Rational(den, num);
        }

        // return a / b
        public Rational divide(Rational b) {
            Rational a = this;
            return a.multiply(b.reciprocal());
        }
    }


    static void debug(Object... obj) {
        System.err.println(Arrays.deepToString(obj));
    }
}