Program 17: Trees and fields