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

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
f = D("f")
i = E("i")
n = D("n")
e = C("e")
m = E("m")
g = E("g")
j = A("j")

d.t = l
d.y = i
d.u = n
l.z = i
l.t = i
l.y = i
l.q = j
l.o = m
b.v = e
b.u = e
f.t = m
i.s = l
i.p = g
n.t = g
e.v = b
e.u = b
m.s = l
m.p = i
g.s = l
g.p = i
j.t = l
j.y = g
j.u = f
assert d.y.p.p.s.o.s.y.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
f = D("f")
i = E("i")
n = D("n")
e = C("e")
m = E("m")
g = E("g")
j = A("j")

d.t = l
d.y = i
d.u = n
l.z = i
l.t = i
l.y = i
l.q = j
l.o = m
b.v = e
b.u = e
f.t = m
i.s = l
i.p = g
n.t = g
e.v = b
e.u = b
m.s = l
m.p = i
g.s = l
g.p = i
j.t = l
j.y = g
j.u = f
assert d.y.p.p.s.o.s.y.s.o.txt == "m"