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

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

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

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

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

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

e.r = h
e.o = b
b.p = l
b.t = h
b.w = c
a.q = b
c.z = a
c.t = e
c.w = h
c.r = k
n.p = l
n.s = h
n.v = b
k.z = a
k.t = e
k.w = h
k.r = h
i.p = l
i.v = l
i.s = c
l.p = b
l.t = k
l.w = h
h.z = a
h.t = e
h.w = c
h.r = k
assert e.r.r.t.o.w.t.o.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

e.r = h
e.o = b
b.p = l
b.t = h
b.w = c
a.q = b
c.z = a
c.t = e
c.w = h
c.r = k
n.p = l
n.s = h
n.v = b
k.z = a
k.t = e
k.w = h
k.r = h
i.p = l
i.v = l
i.s = c
l.p = b
l.t = k
l.w = h
h.z = a
h.t = e
h.w = c
h.r = k
assert e.r.r.t.o.w.t.o.p.p.txt == "b"