Bright and dark solitons in a cascaded system