#include <iostream>
using namespace std;

int cf(int n){
	if(n%2 == 1)
		return cf(3*n + 1);
	if(n%2 == 0)
		return n / 2;
}

int main(){
	cout << cf(5) << " "<< cf(6) << " " << cf(7) << endl;
	return 0;
}
