class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
b = D("b")
c = B("c")
i = D("i")

m.q = b
m.x = b
m.v = b
j.s = i
j.v = i
k.r = b
k.p = j
k.v = i
b.t = i
b.v = c
b.u = j
c.s = i
c.v = b
i.t = b
i.v = c
i.u = j
assert k.r.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
b = D("b")
c = B("c")
i = D("i")

m.q = b
m.x = b
m.v = b
j.s = i
j.v = i
k.r = b
k.p = j
k.v = i
b.t = i
b.v = c
b.u = j
c.s = i
c.v = b
i.t = b
i.v = c
i.u = j
assert k.r.t.u.txt == "j"