#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, counter, a, b, c;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    counter = 0;
    while (++counter) {
      (a < b) ? a += b : b += a;
      if (max(a, b) > c) break;
    }
    cout << counter << endl;
  }
}
