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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.r: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.r: E = None
        self.u: D = None
        self.txt = txt

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

f.y = l
f.z = a
k.v = f
k.z = e
n.x = e
n.y = e
n.o = k
n.p = k
l.o = m
l.z = f
l.v = e
l.x = a
m.o = h
m.r = h
m.p = n
m.u = a
b.v = f
b.z = e
e.o = h
e.p = n
e.r = m
e.u = l
a.o = h
a.z = f
a.v = m
a.x = l
h.o = e
h.p = j
h.r = m
h.u = l
j.x = h
j.o = k
j.p = k
j.y = e
assert b.z.u.z.y.z.z.x.x.txt == "a"