Similar Items: Capturing Polynomial Time using Modular Decomposition