python solution for Largest Prime Factor