program to find HCF on any list