// P01 3N+1問題
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int i, j;
while(cin >>i >>j){
int m = min(i, j);int M = max(i,j);int cycle = 0;
for (int k = m; k <= M; k++){
int n= k;int t =0;while (1){
t++;
if (n ==1) break;
if(n%2) n=3*n+1;
else n=n/2;
}
cycle = max(cycle, t);
}
cout <<i<<" "<< j <<" "<< cycle << endl;
}
return 0;
}