class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.o: C = None
        self.x: F = None
        self.s: H = None
        self.q: H = None
        self.r: D = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.x: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.o: I = None
        self.t: D = None
        self.v: C = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: E = None
        self.o: E = None
        self.v: E = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: A = None
        self.q: G = None
        self.p: D = None
        self.t: E = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: G = None
        self.x: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.o: I = None
        self.t: D = None
        self.v: C = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: E = None
        self.o: E = None
        self.v: E = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: A = None
        self.q: G = None
        self.p: D = None
        self.t: E = None
        self.r: D = None
        self.txt = txt

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

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