class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: H = None
        self.q: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.o: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.y: A = None
        self.v: D = None
        self.u: G = None
        self.o: G = None
        self.q: G = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: H = None
        self.x: B = None
        self.q: A = None
        self.p: G = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: F = None
        self.w: H = None
        self.v: E = None
        self.q: A = None
        self.y: H = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: C = None
        self.txt = txt

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

b = A("b")
d = B("d")
e = C("e")
c = D("c")
i = E("i")
n = F("n")
a = G("a")
l = H("l")
m = I("m")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.o: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.y: A = None
        self.v: D = None
        self.u: G = None
        self.o: G = None
        self.q: G = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: H = None
        self.x: B = None
        self.q: A = None
        self.p: G = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: F = None
        self.w: H = None
        self.v: E = None
        self.q: A = None
        self.y: H = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: C = None
        self.txt = txt

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

b = A("b")
d = B("d")
e = C("e")
c = D("c")
i = E("i")
n = F("n")
a = G("a")
l = H("l")
m = I("m")

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