@Override
    public @NotNull <T> ResolveState put(@NotNull Key<T> key, T value) {
      if (myKey1.equals(key)) {
        return new TwoElementResolveState(key, value, myKey2, myValue2);
      }
      if (myKey2.equals(key)) {
        return new TwoElementResolveState(myKey1, myValue1, key, value);
      }

      return new ManyElementResolveState(this, key, value);
    }
@Override
    public @NotNull <T> ResolveState put(@NotNull Key<T> key, T value)