import java.util.*;

class gerbil {
  int gerbilNumber;
  gerbil(int gn) { gerbilNumber = gn; }
  void hop() {
    System.out.println("gerbil " + gerbilNumber + " hopping");
  }
}

public class ch8ex1 {
  public static void main(String args[]) {
    Vector v = new Vector();
    for(int i = 0; i < 10; i++)
      v.addElement(new gerbil(i));
    for(int i = 0; i < v.size(); i++)
      ((gerbil)v.elementAt(i)).hop();
  }
}
