/*   @JUDGE_ID:   1705PZ   100   C */
#include <stdio.h>

int work(int x)
{
	int count = 1;
	while(x != 1)
	{
		count++;
		if(x % 2 == 0)
			x /= 2;
		else
			x = 3 * x + 1;
	}
	return count;
}

int main(){
	int i, temp, m, bm, n, bn, count, count1;
	while(scanf("%d %d",&bm,&bn) == 2)
	{
		m = bm;	n = bn;	count = 0;
		if(m > n){
			temp = m;
			m = n;
			n = temp;
		}
		for(i = m;i <= n;i++)
		{
			count1 = work(i);
			if(count1 > count)
				count = count1;
		}
		printf("%d %d %d\n",bm,bn,count);
	}
	return 0;
}
@END_OF_SOURCE_CODE
