PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX : <http://example.org/sample#>

:i a :A.

() log:negativeSurface {
    :i a :C.
}.

() log:negativeSurface {
    () log:negativeSurface {
        () log:negativeSurface {
            :i a :D.
        }.
    }.
}.

(_:S) log:negativeSurface {
    _:S a :A.
    () log:negativeSurface {
        _:S a :B.
    }.
    () log:negativeSurface {
        _:S a :C.
    }.
    () log:negativeSurface {
        _:S a :D.
    }.
}.

# query
(_:S _:C) log:querySurface {
    _:S a _:C.
}.
