#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long int a, b, n;
    cin >> a >> b >> n;
    int co = 0;
    while (1) {
      if (a > n || b > n) break;
      if (a > b)
        b = b + a;
      else
        a = a + b;
      co++;
    }
    cout << co << endl;
  }
}
