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

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

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

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

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

d = A("d")
a = B("a")
l = C("l")
k = D("k")
n = E("n")
i = E("i")
m = B("m")
c = C("c")
e = D("e")

d.s = m
a.q = n
a.w = l
l.y = k
l.u = k
l.v = n
l.w = a
k.u = i
k.r = d
k.y = a
n.w = i
n.r = d
n.y = l
n.t = l
i.w = n
i.r = d
i.y = c
i.t = l
m.q = i
m.w = c
c.y = k
c.v = n
c.u = e
c.w = a
e.u = i
e.r = d
e.y = m
assert d.s.q.t.u.y.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

d = A("d")
a = B("a")
l = C("l")
k = D("k")
n = E("n")
i = E("i")
m = B("m")
c = C("c")
e = D("e")

d.s = m
a.q = n
a.w = l
l.y = k
l.u = k
l.v = n
l.w = a
k.u = i
k.r = d
k.y = a
n.w = i
n.r = d
n.y = l
n.t = l
i.w = n
i.r = d
i.y = c
i.t = l
m.q = i
m.w = c
c.y = k
c.v = n
c.u = e
c.w = a
e.u = i
e.r = d
e.y = m
assert d.s.q.t.u.y.q.r.txt == "d"