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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.o: G = None
        self.w: G = None
        self.q: E = None
        self.v: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

m = A("m")
b = B("b")
e = C("e")
k = D("k")
f = E("f")
n = F("n")
j = G("j")
h = B("h")
d = F("d")
l = E("l")

m.v = e
m.q = n
m.w = b
b.z = d
b.q = h
e.p = l
e.t = m
e.v = m
e.o = j
e.w = j
e.q = f
e.x = f
k.x = l
f.v = m
f.s = k
f.q = j
f.w = n
f.r = l
f.x = l
n.u = e
n.s = e
n.o = f
n.x = j
j.z = l
h.z = n
h.q = b
d.u = e
d.s = e
d.o = l
d.x = j
l.v = m
l.s = k
l.q = j
l.w = d
l.r = f
l.x = f
assert e.t.w.q.q.q.z.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.o: G = None
        self.w: G = None
        self.q: E = None
        self.v: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

m = A("m")
b = B("b")
e = C("e")
k = D("k")
f = E("f")
n = F("n")
j = G("j")
h = B("h")
d = F("d")
l = E("l")

m.v = e
m.q = n
m.w = b
b.z = d
b.q = h
e.p = l
e.t = m
e.v = m
e.o = j
e.w = j
e.q = f
e.x = f
k.x = l
f.v = m
f.s = k
f.q = j
f.w = n
f.r = l
f.x = l
n.u = e
n.s = e
n.o = f
n.x = j
j.z = l
h.z = n
h.q = b
d.u = e
d.s = e
d.o = l
d.x = j
l.v = m
l.s = k
l.q = j
l.w = d
l.r = f
l.x = f
assert e.t.w.q.q.q.z.s.v.txt == "m"