class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: G = None
        self.s: B = None
        self.t: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: E = None
        self.p: G = None
        self.r: E = None
        self.u: C = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.u: B = None
        self.s: B = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.o: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: G = None
        self.s: B = None
        self.t: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.o: E = None
        self.p: G = None
        self.r: E = None
        self.u: C = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.u: B = None
        self.s: B = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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