Hcf implemented with recursion method