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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.function.Function;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author out_of_the_box
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        CMixingWater solver = new CMixingWater();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class CMixingWater {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            long h = in.nextLong();
            h <<= 1L;
            long c = in.nextLong();
            c <<= 1L;
            long t = in.nextLong();
            t <<= 1L;
            long a = (h + c) / 2L;
            if (t <= a) {
                out.println(2);
            } else {
                h >>= 1L;
                c >>= 1L;
                t >>= 1L;
                long finalH = h;
                long finalC = c;
                long finalT = t;
                Fraction ft = new Fraction(finalT, 1L);
                Function<Long, Boolean> func =
                        some -> ((getTemp(some, finalH, finalC).compareTo(ft)) < 0);
                long mx = getMax(1, func);
                long intx = BinarySearch.searchLastZero(0L, mx, func);
                long othx = BinarySearch.searchFirstOne(0L, mx, func);
                Fraction val = getTemp(intx, h, c);
                Fraction vall = getTemp(othx, h, c);
                if (val.sub(ft).abs().compareTo(vall.sub(ft).abs()) <= 0) {
//            if (Double.compare(Math.abs(val.sub(ft)), Math.abs(vall.sub(ft))) <= 0) {
                    out.println(2L * intx + 1L);
                } else {
                    out.println(2L * othx + 1L);
                }
//            long num = h-t;
//            long denom = 2L*t-h-c;
//            if (num%denom == 0L) {
//                long x = num/denom;
//                double temp = getTemp(x, h, c);
//                MiscUtility.assertion(Double.compare(temp, t) == 0,
//                        String.format("Temp [%f] and t[%d] are not eq.", temp, t));
//                out.println(2L*x+1L);
//            } else {
//                long x = num/denom;
//                double val = getTemp(x,h,c);
//                double vall = getTemp(x+1L,h,c);
//                double dif = Math.abs(val-t);
//                double diff = Math.abs(vall-t);
//                if (dif <= diff) {
//                    out.println(2L*x+1L);
//                } else {
//                    out.println(2L*x+3L);
//                }
//            }
            }
        }

        private Fraction getTemp(long x, long h, long c) {
            return new Fraction(x * h + h + x * c, 2 * x + 1);
        }

        private long getMax(long start, Function<Long, Boolean> func) {
            long mx = (Long.MAX_VALUE >> 1L);
            while (!func.apply(start) && start <= mx) {
                start <<= 1L;
            }
            return start;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(long i) {
            writer.println(i);
        }

        public void println(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return nextString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class Fraction implements Comparable<Fraction> {
        public long num;
        public long denom;

        public Fraction(long num, long denom) {
            if (denom == 0) {
                throw new RuntimeException("Denominator cannot be 0");
            }
            this.num = num;
            this.denom = denom;
        }

        public Fraction add(Fraction other) {
            long lcm = MathUtility.lcm(denom, other.denom);
            long mul = lcm / denom;
            long omul = lcm / other.denom;
            long nu = num * mul + other.num * omul;
            return new Fraction(nu, lcm);
        }

        public Fraction sub(Fraction other) {
            return add(new Fraction(-other.num, other.denom));
        }

        public Fraction abs() {
            return new Fraction(Math.abs(num), Math.abs(denom));
        }

        public int compareTo(Fraction o) {
            return Long.compare(this.num * o.denom, this.denom * o.num);
        }

    }

    static class MathUtility {
        public static long hcf(long a, long b) {
            if (a == 0L) {
                return b;
            }
            return hcf(b % a, a);
        }

        public static long lcm(long a, long b) {
            if (a > b) return lcm(b, a);
            long hcf = hcf(a, b);
            return (b / hcf) * a;
        }

    }

    static class BinarySearch {
        public static long searchLastZero(long start, long end, Function<Long, Boolean> valueFunc) {
            long low = start;
            long high = end - 1L;
            while (low < high) {
                long mid = low + (high - low) / 2L;
                if (valueFunc.apply(mid + 1L)) {
                    high = mid;
                } else {
                    low = mid + 1L;
                }
            }

            if (!valueFunc.apply(low)) {
                return low;
            } else {
                return start - 1L;
            }
        }

        public static long searchFirstOne(long start, long end, Function<Long, Boolean> valueFunc) {
            long low = start;
            long high = end - 1L;
            while (low < high) {
                long mid = low + (high - low) / 2L;
                if (valueFunc.apply(mid)) {
                    high = mid;
                } else {
                    low = mid + 1L;
                }
            }

            if (valueFunc.apply(low)) {
                return low;
            } else {
                return end;
            }
        }

    }
}

