class A1 {
    val property: Any get() = TODO()
    fun function(value: Any): Any = value

    class Nested {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }

    inner class Inner {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }
}

class A2<T : Any?> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any?> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class A3<R : Any?> {
    val property: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R : Any?> {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }
}

class A4<T : Any> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class A5<T : CharSequence> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : CharSequence> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class A6<T : String> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : String> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class A7<String> {
    val property: String get() = TODO()
    fun function(value: String): String = value

    class Nested<String> {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }
}

class B1 {
    val property: Any get() = TODO()
    fun function(value: Any): Any = value

    class Nested {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }

    inner class Inner {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }
}

class B2<T : Any?> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any?> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class B3<R : Any?> {
    val property: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R : Any?> {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }
}

class B4<T : Any> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class B5<T : CharSequence> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : CharSequence> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class B6<T : String> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : String> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class B7<String> {
    val property: String get() = TODO()
    fun function(value: String): String = value

    class Nested<String> {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }
}

class C1 {
    val property: Any get() = TODO()
    fun function(value: Any): Any = value

    class Nested {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }

    inner class Inner {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }
}

class C2<T : Any?> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any?> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class C3<R : Any?> {
    val property: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R : Any?> {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }
}

class C4<T : Any> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class C5<T : CharSequence> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : CharSequence> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class C6<T : String> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : String> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class C7<String> {
    val property: String get() = TODO()
    fun function(value: String): String = value

    class Nested<String> {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }
}

class D1 {
    val property: Any get() = TODO()
    fun function(value: Any): Any = value

    class Nested {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }

    inner class Inner {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }
}

class D2<T : Any?> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any?> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class D3<R : Any?> {
    val property: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R : Any?> {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }
}

class D4<T : Any> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class D5<T : CharSequence> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : CharSequence> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class D6<T : String> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : String> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class D7<String> {
    val property: String get() = TODO()
    fun function(value: String): String = value

    class Nested<String> {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }
}

class E1 {
    val property: Any get() = TODO()
    fun function(value: Any): Any = value

    class Nested {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }

    inner class Inner {
        val property: Any get() = TODO()
        fun function(value: Any): Any = value
    }
}

class E2<T : Any?> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any?> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class E3<R : Any?> {
    val property: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R : Any?> {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property: R get() = TODO()
        fun function(value: R): R = value
    }
}

class E4<T : Any> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : Any> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class E5<T : CharSequence> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : CharSequence> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class E6<T : String> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T : String> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class E7<String> {
    val property: String get() = TODO()
    fun function(value: String): String = value

    class Nested<String> {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: String): String = value
    }
}

class F1<T> {
    val property: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T> {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: T): T = value
    }
}

class F2<in T> {
    val property: String get() = TODO()
    fun function(value: T): Any = TODO()

    class Nested<in T> {
        val property: String get() = TODO()
        fun function(value: T): Any = TODO()
    }

    inner class Inner {
        val property: String get() = TODO()
        fun function(value: T): Any = TODO()
    }
}

class F3<out T> {
    val property: T get() = TODO()
    fun function(value: Any): T = TODO()

    class Nested<out T> {
        val property: T get() = TODO()
        fun function(value: Any): T = TODO()
    }

    inner class Inner {
        val property: T get() = TODO()
        fun function(value: Any): T = TODO()
    }
}

class G1<T, R> {
    val property1: T get() = TODO()
    val property2: R get() = TODO()
    fun function(value: T): R = TODO()

    class Nested<T, R> {
        val property1: T get() = TODO()
        val property2: R get() = TODO()
        fun function(value: T): R = TODO()
    }

    inner class Inner {
        val property1: T get() = TODO()
        val property2: R get() = TODO()
        fun function(value: T): R = TODO()
    }
}

class G2<T> {
    val property1: T get() = TODO()
    val property2: T get() = TODO()
    fun function(value: T): T = value

    class Nested<T> {
        val property1: T get() = TODO()
        val property2: T get() = TODO()
        fun function(value: T): T = value
    }

    inner class Inner {
        val property1: T get() = TODO()
        val property2: T get() = TODO()
        fun function(value: T): T = value
    }
}

class G3<R> {
    val property1: R get() = TODO()
    val property2: R get() = TODO()
    fun function(value: R): R = value

    class Nested<R> {
        val property1: R get() = TODO()
        val property2: R get() = TODO()
        fun function(value: R): R = value
    }

    inner class Inner {
        val property1: R get() = TODO()
        val property2: R get() = TODO()
        fun function(value: R): R = value
    }
}

class G4<R, T> {
    val property1: T get() = TODO()
    val property2: R get() = TODO()
    fun function(value: T): R = TODO()

    class Nested<R, T> {
        val property1: T get() = TODO()
        val property2: R get() = TODO()
        fun function(value: T): R = TODO()
    }

    inner class Inner {
        val property1: T get() = TODO()
        val property2: R get() = TODO()
        fun function(value: T): R = TODO()
    }
}

class H1<T> {
    val dependentProperty: T get() = TODO()
    fun dependentFunction(value: T): T = value

    val T.dependentExtensionProperty: T get() = this
    fun T.dependentExtensionFunction(): T = this

    fun <T> independentFunction(): T = TODO()

    val <T> T.independentExtensionProperty: T get() = this
    fun <T> T.independentExtensionFunction(): T = this
}

class H2<T> {
    val dependentProperty: T get() = TODO()
    fun dependentFunction(value: T): T = value

    val T.dependentExtensionProperty: T get() = this
    fun T.dependentExtensionFunction(): T = this

    fun independentFunction(): T = TODO()

    val T.independentExtensionProperty: T get() = this
    fun T.independentExtensionFunction(): T = this
}

class I<T : I<T>> {
    val property: T get() = TODO()
    fun function(value: T): T = value
}

interface J1<A> {
    actual fun a(): A
}

interface J2<A, B> {
    actual fun a(b: B): A
    actual fun b(a: A): B
}

interface J3<A, B, C> {
    actual fun a(b: B, c: C): A
    actual fun b(a: A, c: C): B
    actual fun c(a: A, b: B): C
}

class K<A, B : A, C : J1<B>, D : J2<C, A>> : J3<D, C, B> {
    override fun a(b: C, c: B): D = TODO()
    override fun b(a: D, c: B): C = TODO()
    override fun c(a: D, b: C): B = TODO()
    inner class Inner<C, D : C, E : J2<C, D>> {
        fun dependentFunction(value: A): E = TODO()
        fun <A : CharSequence, E : Number> independentFunction(value: A): E = TODO()
    }
}
