Invariant theory without groups