class Hobbits {
  String nombre;
  public static void main(String [] args) {
     Hobbits [] h = new Hobbits[3];
     int z=0;
     while (z<4) {
        z++;
        h[z] = new Hobbits();
        h[z].nombre="bilbo";
        if (z==1) {
           h[z].nombre="frodo";
        }
        if (z==2) {
           h[z].nombre="sam";
        }
        System.out.println(h[z].nombre);
     }
 }
}