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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

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

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

l.u = h
l.t = k
l.p = n
h.u = e
h.y = k
n.u = a
n.v = d
n.o = b
n.q = e
e.z = h
e.r = k
e.q = b
k.y = b
j.y = b
i.u = e
i.y = k
b.y = j
d.u = e
d.y = b
a.u = d
a.t = j
a.p = n
assert j.y.y.y.txt == "b"