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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.v: C = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: A = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: A = None
        self.v: C = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

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

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

e.t = c
e.u = n
e.z = d
e.v = l
k.q = d
k.z = e
k.y = n
k.v = l
n.v = c
n.r = c
d.x = k
d.s = e
d.y = e
d.v = n
d.p = c
f.t = k
f.p = l
c.v = n
c.p = e
c.z = k
l.t = k
l.p = f
assert l.p.t.z.v.txt == "l"