class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.y: D = None
        self.x: E = None
        self.s: F = None
        self.r: F = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: G = None
        self.y: E = None
        self.u: G = None
        self.w: H = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.s: A = None
        self.q: F = None
        self.v: F = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

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

i = A("i")
a = B("a")
m = C("m")
e = D("e")
c = E("c")
h = F("h")
k = G("k")
n = H("n")
g = B("g")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: G = None
        self.y: E = None
        self.u: G = None
        self.w: H = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.s: A = None
        self.q: F = None
        self.v: F = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

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

i = A("i")
a = B("a")
m = C("m")
e = D("e")
c = E("c")
h = F("h")
k = G("k")
n = H("n")
g = B("g")

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