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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.z: H = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.s: B = None
        self.r: G = None
        self.x: F = None
        self.u: E = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.z: H = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.s: B = None
        self.r: G = None
        self.x: F = None
        self.u: E = None
        self.p: E = None
        self.t: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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