public static void main(String args[]){
    
    ArrayList<Molecule> children;
    
    Molecule X = new Molecule();
    
    Molecule A = new Molecule(1, X, X);
    Molecule B = new Molecule(2, X, X);
    Molecule C = new Molecule(3, X, X);
    Molecule D = new Molecule(4, new Molecule(A), new Molecule(B));
    Molecule E = new Molecule(5, new Molecule(D), new Molecule(C));
    Molecule F = new Molecule(6, new Molecule(B), new Molecule(C));
    Molecule G = new Molecule(7, new Molecule(E), new Molecule(F));
    Molecule H = new Molecule(8, new Molecule(G), new Molecule(B));
    Molecule I = new Molecule(9, new Molecule(H), new Molecule(F));
    
    children = A.getChildren();
    System.out.printf("Children of A are: "+Global.chars[children.get(0).getID()]+" and "
                      +Global.chars[children.get(1).getID()]+"\n");
    children = D.getChildren();
    System.out.printf("Children of D are: "+Global.chars[children.get(0).getID()]+" and "
                      +Global.chars[children.get(1).getID()]+"\n");        
    String str1 = E.toStringf();
    String str2 = F.toStringf();
    String str3 = G.toStringf();
    String str4 = I.toStringf();
    System.out.println("E is "+str1);
    System.out.println("F is "+str2);
    System.out.println("G is "+str3);
    System.out.println("I is "+str4);
    
    
    System.out.printf("Calculating MoleculeID for I...\n");
    I.calculateMoleculeID(0,0, new int[0]);
    
    
    
    ArrayList<Molecule> arrI = new ArrayList<Molecule>();
    arrI = I.sortIntoArray(arrI);
    
    int[] rand = I.selectRandom();
    System.out.printf("Random element: "+Arrays.toString(rand)+"\n");
    
    for(int i=0; i<arrI.size(); i++){
      System.out.printf("|| %d\n", arrI.get(i).getID());
    }
    
    int[] arr = {0,0,0};
    System.out.printf("Getting from MoleculeID...\n");
    Molecule P = I.getFromMoleculeID(arr, arr.length, 0);
    
    if(P == null){
      System.out.printf("P IS NULL LOL\n");
    }
    
    System.out.printf("Converting to String...\n");
    String strP = P.toStringf();
    System.out.println("P is: "+strP);
    
    System.out.println("Splitting I at P...");
    ArrayList<Molecule> fragments = I.split(arr);
    //String frag1 = fragments.get(0).toStringf();
    //String frag2 = fragments.get(1).toStringf();
    int fragSize = fragments.size();
    //System.out.println("Fragments returned are: "+frag1+" and "+frag2);
    System.out.printf("Number of fragments: %d\n", fragSize);
    
    
  }