class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

a = A("a")
l = B("l")
d = C("d")
i = D("i")
m = E("m")
k = F("k")
c = E("c")
e = F("e")
n = D("n")

a.u = l
l.p = d
l.q = d
l.v = e
d.x = c
d.p = k
i.v = e
i.t = d
m.p = d
k.u = l
k.y = l
k.z = c
k.t = d
c.p = d
e.u = l
e.y = l
e.z = m
e.t = d
n.v = k
n.t = d
assert c.p.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

a = A("a")
l = B("l")
d = C("d")
i = D("i")
m = E("m")
k = F("k")
c = E("c")
e = F("e")
n = D("n")

a.u = l
l.p = d
l.q = d
l.v = e
d.x = c
d.p = k
i.v = e
i.t = d
m.p = d
k.u = l
k.y = l
k.z = c
k.t = d
c.p = d
e.u = l
e.y = l
e.z = m
e.t = d
n.v = k
n.t = d
assert c.p.p.z.txt == "c"