def explode(tagset, suffixes):
    """explode combines tagset and suffixes in all ways.

    Args:
      tagset: Original suffixes.
      suffixes: Suffixes to combine before and after.

    Returns:
      The set of possible combinations.
    """
    result = [t for t in tagset]
    result += [s for s in suffixes]
    for t in tagset:
        result += [t + s for s in suffixes]
        result += [s + t for s in suffixes]
    return result