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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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