#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
using namespace std;
const int mod = 998244353;
const int mxn = 1e6 + 7;
const int inf = 1e9;
int _, n, m, t, k, u, v, w, ans, cnt, ok, lim, len, tmp, last, nx;
struct node {
  int u, v, nx, w;
} e[mxn];
string str;
long double calc(long double x) {
  return abs((x * n + (x - 1) * m) / (x * 2.0 - 1) - k);
}
void solve() {
  int l = 1, r = mxn;
  while (l < r) {
    int ml = l + (r - l) / 3;
    int mr = r - (r - l) / 3;
    long double ls = calc(ml), rs = calc(mr);
    if (ls > rs)
      l = ml + 1;
    else
      r = mr - 1;
  }
  cout << l * 2 - 1 << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  for (cin >> t; t; t--) {
    cin >> n >> m >> k;
    if (n <= k)
      cout << 1 << endl;
    else if ((n + m) / 2 >= k)
      cout << 2 << endl;
    else
      solve();
  }
}
