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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: D = None
        self.t: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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