generate input automatically in Memory