itags by similarity: Use itertools.chain to flatten