Maximum matching in graphs of any type