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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.t: F = None
        self.v: B = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: C = None
        self.txt = txt

f = A("f")
b = B("b")
i = C("i")
e = D("e")
l = E("l")
n = F("n")
g = D("g")
d = C("d")

f.t = e
f.v = n
f.x = l
b.w = d
i.z = n
i.x = n
e.z = b
l.q = b
l.v = b
l.p = f
l.t = n
l.y = i
l.u = i
n.s = f
n.u = d
g.z = b
d.z = n
d.x = n
assert e.z.w.x.u.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.t: F = None
        self.v: B = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: C = None
        self.txt = txt

f = A("f")
b = B("b")
i = C("i")
e = D("e")
l = E("l")
n = F("n")
g = D("g")
d = C("d")

f.t = e
f.v = n
f.x = l
b.w = d
i.z = n
i.x = n
e.z = b
l.q = b
l.v = b
l.p = f
l.t = n
l.y = i
l.u = i
n.s = f
n.u = d
g.z = b
d.z = n
d.x = n
assert e.z.w.x.u.z.s.txt == "f"