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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: F = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.s: E = None
        self.v: G = None
        self.t: I = None
        self.u: G = None
        self.y: B = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: F = None
        self.z: H = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.s: E = None
        self.v: G = None
        self.t: I = None
        self.u: G = None
        self.y: B = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

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

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

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