import java.util.*;
public class Test{

public static void main(String[] args) {

Collection c = new HashSet();

c.add(new Name("F11", "l11"));
c.add(new Name("F2", "l2"));
c.add(new Name("F31", "l31"));

for(Iterator i=c.iterator(); i.hasNext();){
Name n = (Name)i.next();
if(n.getFirstName().length()<3){
n.remove();
}

}
System.out.println(c); }

}

class Name {

String firstName, lastName;

public Name(String firstName, String lastName) {
this.firstName = firstName; this.lastName = lastName;
}

public String getFirstName() {return firstName;}


}