class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: D = None
        self.r: F = None
        self.s: B = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.u: B = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

b = A("b")
j = B("j")
k = C("k")
e = D("e")
m = E("m")
i = F("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: D = None
        self.u: B = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

b = A("b")
j = B("j")
k = C("k")
e = D("e")
m = E("m")
i = F("i")

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