a=list(file("../fd/0")) for l in a: while`a`.count(`l`[:-2])<2:l=l[:-1] print l