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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.q: F = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

m.v = c
m.t = k
i.q = c
c.o = i
c.y = l
c.q = l
c.x = l
c.z = m
k.s = l
k.p = l
e.z = m
e.y = m
e.q = c
l.p = i
l.o = m
l.w = m
l.z = c
assert m.v.z.v.z.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.q: F = None
        self.x: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

m.v = c
m.t = k
i.q = c
c.o = i
c.y = l
c.q = l
c.x = l
c.z = m
k.s = l
k.p = l
e.z = m
e.y = m
e.q = c
l.p = i
l.o = m
l.w = m
l.z = c
assert m.v.z.v.z.t.s.txt == "l"