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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: D = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: D = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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