Random tree generation.