longest common profix probelm, passed