#include #include using namespace std; int main () { int i, j, t_i, t_j,s; while(scanf("%d %d", &i, &j)!=EOF ) { t_i = i; t_j = j; if (i>j ) { s=i; i=j; j=s; } int max_length = 0; int cycle_length; while(i<=j) { int n = i; cycle_length = 1; while (n!=1) { if ((n%2)==1) n = 3 * n + 1; else n = (n/2); cycle_length++; } if (cycle_length>max_length) max_length = cycle_length; i++; } printf ("%d %d %d\n", t_i, t_j, max_length); } return 0; }