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

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

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

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

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

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

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

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

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

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

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

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

a.y = l
a.t = b
a.v = e
a.s = e
a.u = n
b.w = l
b.y = j
j.s = b
j.p = b
i.r = d
d.r = j
k.r = d
g.r = j
n.y = l
n.t = b
n.v = e
n.u = e
n.s = a
e.y = d
e.t = b
e.v = n
e.u = n
e.s = a
l.r = j
assert j.s.y.s.w.r.p.y.s.txt == "b"