public static void print(Collection<? extends Object> collection) {
        Iterator<? extends Object> it = collection.iterator();
        collection.getClass();
        System.out.print(collection.getClass().getSimpleName() + ": " +
                            (it.hasNext() ? it.next() : null));

        while(it.hasNext()) {
            System.out.print(", " + it.next());
        }

        System.out.println("\n");
    }