class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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