class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: B = None
        self.y: C = None
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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

j.t = i
j.y = i
j.z = i
j.w = n
j.s = m
a.p = h
a.t = j
a.r = m
a.s = n
a.v = d
i.s = l
i.q = m
m.s = j
m.r = f
m.z = l
f.u = l
n.p = i
n.t = g
n.r = m
n.s = a
n.v = j
h.s = l
h.q = m
d.t = i
d.z = i
d.w = n
d.y = h
d.s = m
g.t = i
g.w = a
g.y = h
g.z = h
g.s = m
l.u = f
assert g.s.s.y.s.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: B = None
        self.y: C = None
        self.s: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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

j.t = i
j.y = i
j.z = i
j.w = n
j.s = m
a.p = h
a.t = j
a.r = m
a.s = n
a.v = d
i.s = l
i.q = m
m.s = j
m.r = f
m.z = l
f.u = l
n.p = i
n.t = g
n.r = m
n.s = a
n.v = j
h.s = l
h.q = m
d.t = i
d.z = i
d.w = n
d.y = h
d.s = m
g.t = i
g.w = a
g.y = h
g.z = h
g.s = m
l.u = f
assert g.s.s.y.s.u.u.u.txt == "f"