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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
d = C("d")
j = D("j")
g = E("g")
e = B("e")
a = C("a")
l = A("l")
h = A("h")

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
d = C("d")
j = D("j")
g = E("g")
e = B("e")
a = C("a")
l = A("l")
h = A("h")

k.q = g
k.p = j
k.t = d
k.s = d
k.r = m
m.w = e
m.s = e
m.u = a
d.y = g
j.s = m
g.u = j
g.v = e
g.y = e
g.s = m
g.t = m
e.w = m
e.s = m
e.u = d
a.y = g
l.q = g
l.p = j
l.t = d
l.s = d
l.r = m
h.q = g
h.p = j
h.t = d
h.s = a
h.r = e
assert m.u.y.t.s.txt == "e"