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

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

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

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

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

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

c.z = l
c.v = g
k.u = l
k.o = c
k.r = c
k.p = c
k.v = n
d.w = l
d.v = g
n.q = f
n.o = g
n.t = d
g.q = k
g.z = k
g.y = f
g.s = f
g.w = h
l.u = k
l.o = c
l.r = c
l.p = c
l.v = n
m.q = l
m.z = l
m.y = c
m.s = e
m.w = n
h.q = f
h.o = g
h.t = d
f.z = l
f.v = m
e.z = l
e.v = g
assert g.y.v.s.z.u.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

c.z = l
c.v = g
k.u = l
k.o = c
k.r = c
k.p = c
k.v = n
d.w = l
d.v = g
n.q = f
n.o = g
n.t = d
g.q = k
g.z = k
g.y = f
g.s = f
g.w = h
l.u = k
l.o = c
l.r = c
l.p = c
l.v = n
m.q = l
m.z = l
m.y = c
m.s = e
m.w = n
h.q = f
h.o = g
h.t = d
f.z = l
f.v = m
e.z = l
e.v = g
assert g.y.v.s.z.u.r.z.txt == "l"