Study of the doubly and single Cabibbo suppressed decays D+ -> k+ p i+ pi- and D(s)-> k+ pi+ p-.