tree and graph and stack