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

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

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

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

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

k = A("k")
g = B("g")
c = C("c")
i = D("i")
b = E("b")
j = E("j")
m = E("m")
d = B("d")
a = E("a")
n = C("n")

k.t = i
k.y = i
k.p = b
g.y = m
g.u = d
g.q = i
c.p = i
c.t = i
c.y = i
c.r = a
i.v = c
i.x = c
i.t = m
i.q = a
b.o = a
j.o = m
m.o = j
d.y = j
d.u = g
d.q = i
a.o = j
n.p = i
n.t = i
n.y = i
n.r = a
assert j.o.o.o.o.o.o.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

k = A("k")
g = B("g")
c = C("c")
i = D("i")
b = E("b")
j = E("j")
m = E("m")
d = B("d")
a = E("a")
n = C("n")

k.t = i
k.y = i
k.p = b
g.y = m
g.u = d
g.q = i
c.p = i
c.t = i
c.y = i
c.r = a
i.v = c
i.x = c
i.t = m
i.q = a
b.o = a
j.o = m
m.o = j
d.y = j
d.u = g
d.q = i
a.o = j
n.p = i
n.t = i
n.y = i
n.r = a
assert j.o.o.o.o.o.o.o.o.o.txt == "m"