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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.txt = txt

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

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

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