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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

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

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

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

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