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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.t: F = None
        self.s: H = None
        self.q: A = None
        self.w: C = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.x: B = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: H = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: A = None
        self.o: F = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: I = None
        self.t: F = None
        self.s: H = None
        self.q: A = None
        self.w: C = None
        self.r: I = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.x: B = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: H = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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