#H1 Uva100 The 3n + 1 problem
#include <bits/stdc++.h>
using namespace std;
int main() {
int x,y,start,end;
while(cin>>x>>y){
start=x;
end=y;
if(start>end){
int temp=end;
end=start;
start=temp;
}
int ans=0;
for(int i=start;i<=end;i++){
int index=i,count=0;
while(index!=1){
if(index%2){
index*=3;
index+=1;
}else{
index/=2;
}
count++;
}
ans=max(ans,count);
}
cout<<x<<" "<<y<<" "<<++ans<<endl;
}
}