#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int a, b, t;
    cin >> a >> b >> t;
    int count = 0;
    while (a <= t && b <= t) {
      int diff = min(a, b);
      int d = max(a, b);
      diff += d;
      a = diff;
      b = d;
      count++;
    }
    cout << count << endl;
  }
  return 0;
}
