Tree generator to deal with names and generations