class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.u: A = None
        self.q: E = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

n.y = e
n.v = h
n.u = h
n.q = f
n.r = k
i.r = m
i.y = h
i.x = a
i.o = e
k.o = f
k.w = f
k.v = m
e.v = k
e.y = k
e.z = f
f.z = a
f.v = a
f.y = h
f.s = k
g.r = m
g.y = n
g.x = a
g.o = a
h.y = a
h.v = n
h.u = n
h.q = f
h.r = m
l.r = m
l.y = n
l.x = a
l.o = a
a.v = k
a.y = k
a.z = f
m.o = f
m.w = f
m.v = k
assert l.r.v.w.v.z.v.txt == "a"