#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long ts;
  cin >> ts;
  while (ts--) {
    long long a, b, n, temp = 0, ans = 1, mx = 0;
    cin >> a >> b >> n;
    mx = max(a, b);
    temp = a + b;
    while (temp <= n) {
      temp += mx;
      ans++;
      mx = temp - mx;
    }
    cout << ans << "\n";
  }
  return 0;
}
