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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.p: C = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.p: C = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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