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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.y: A = None
        self.u: I = None
        self.s: G = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.p: B = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: A = None
        self.y: A = None
        self.u: I = None
        self.s: G = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: A = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.p: B = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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