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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.o: A = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.x: C = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.o: A = None
        self.t: E = None
        self.v: A = None
        self.txt = txt

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

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