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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: C = None
        self.t: C = None
        self.p: A = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.z: F = None
        self.txt = txt

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

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

m.x = a
c.z = f
c.v = e
c.p = e
i.v = e
i.u = e
i.o = n
i.t = n
i.r = n
i.p = m
b.o = e
b.x = i
b.u = a
l.r = c
l.y = m
l.z = e
e.t = f
e.s = b
n.v = e
n.u = e
n.o = i
n.t = i
n.r = i
n.p = m
f.r = c
f.y = m
f.z = e
a.o = e
a.x = i
a.u = b
assert m.x.x.t.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: C = None
        self.t: C = None
        self.p: A = None
        self.u: F = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.z: F = None
        self.txt = txt

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

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

m.x = a
c.z = f
c.v = e
c.p = e
i.v = e
i.u = e
i.o = n
i.t = n
i.r = n
i.p = m
b.o = e
b.x = i
b.u = a
l.r = c
l.y = m
l.z = e
e.t = f
e.s = b
n.v = e
n.u = e
n.o = i
n.t = i
n.r = i
n.p = m
f.r = c
f.y = m
f.z = e
a.o = e
a.x = i
a.u = b
assert m.x.x.t.v.t.txt == "f"