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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.y: B = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: A = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: I = None
        self.u: C = None
        self.w: B = None
        self.z: G = None
        self.r: A = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.p: C = None
        self.s: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: E = None
        self.y: B = None
        self.t: I = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: A = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: I = None
        self.u: C = None
        self.w: B = None
        self.z: G = None
        self.r: A = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.p: C = None
        self.s: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.txt = txt

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

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