class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.y: D = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: A = None
        self.y: D = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: G = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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