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

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

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

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

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

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

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

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

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

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

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

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

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