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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.s: B = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

m.v = b
m.x = e
m.r = e
m.w = e
m.t = l
m.s = n
l.w = a
l.r = b
l.o = b
l.z = e
a.u = b
n.z = b
b.q = m
b.o = n
e.r = l
e.s = l
e.p = a
e.u = a
e.w = b
assert n.z.q.x.s.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: F = None
        self.r: F = None
        self.t: B = None
        self.w: F = None
        self.s: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: C = None
        self.s: B = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

m.v = b
m.x = e
m.r = e
m.w = e
m.t = l
m.s = n
l.w = a
l.r = b
l.o = b
l.z = e
a.u = b
n.z = b
b.q = m
b.o = n
e.r = l
e.s = l
e.p = a
e.u = a
e.w = b
assert n.z.q.x.s.z.u.txt == "a"