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

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

m.v = h
h.s = j
h.y = i
f.r = m
f.y = g
f.q = h
f.z = h
f.t = j
b.s = f
b.u = g
b.o = g
l.v = c
k.s = f
k.u = f
k.o = g
g.r = c
g.y = f
g.q = j
g.t = j
g.z = j
i.v = c
c.v = j
j.s = h
j.y = l
assert h.s.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: E = None
        self.txt = txt

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

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

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

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

m.v = h
h.s = j
h.y = i
f.r = m
f.y = g
f.q = h
f.z = h
f.t = j
b.s = f
b.u = g
b.o = g
l.v = c
k.s = f
k.u = f
k.o = g
g.r = c
g.y = f
g.q = j
g.t = j
g.z = j
i.v = c
c.v = j
j.s = h
j.y = l
assert h.s.s.y.txt == "i"