Mode-locking by cascading of second-order nonlinearities