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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.v: B = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: D = None
        self.v: B = None
        self.r: D = None
        self.t: A = None
        self.txt = txt

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

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

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

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