#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, n, s = 0, sum;
  cin >> t;
  while (t--) {
    cin >> a;
    cin >> b;
    cin >> n;
    while (max(a, b) <= n) {
      if (a > b) swap(a, b);
      a += b;
      s++;
    }
    cout << s << endl;
    s = 0;
  }
  return 0;
}
