Adjusted next generation creation function to accept generation input as string and return generation output as string.