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

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

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

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

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

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

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

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

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

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

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

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

a.o = e
a.r = n
a.w = l
a.t = d
d.v = e
d.p = k
d.y = h
d.r = i
e.z = l
e.s = a
e.o = j
m.t = n
m.x = h
i.y = l
i.s = l
i.u = d
i.r = e
i.v = n
k.t = d
k.x = h
h.t = d
h.x = m
j.y = a
j.s = a
j.u = n
j.v = n
j.r = e
n.v = e
n.p = m
n.y = m
n.r = j
l.o = e
l.r = d
l.w = a
l.t = n
assert h.x.t.r.r.o.u.r.r.txt == "e"