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

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

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

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

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

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

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

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

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

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

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

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

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