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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

b = A("b")
a = B("a")
e = C("e")
l = D("l")
m = B("m")
i = C("i")
d = A("d")
j = B("j")
c = B("c")
h = B("h")

b.v = l
b.s = l
b.o = c
a.t = d
a.y = b
a.v = e
e.v = m
e.q = l
l.o = c
m.t = d
m.y = d
m.v = e
i.v = h
i.q = l
d.v = l
d.s = l
d.o = m
j.t = b
j.y = b
j.v = i
c.t = b
c.y = b
c.v = e
h.t = d
h.y = d
h.v = i
assert d.v.o.t.s.o.y.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

b = A("b")
a = B("a")
e = C("e")
l = D("l")
m = B("m")
i = C("i")
d = A("d")
j = B("j")
c = B("c")
h = B("h")

b.v = l
b.s = l
b.o = c
a.t = d
a.y = b
a.v = e
e.v = m
e.q = l
l.o = c
m.t = d
m.y = d
m.v = e
i.v = h
i.q = l
d.v = l
d.s = l
d.o = m
j.t = b
j.y = b
j.v = i
c.t = b
c.y = b
c.v = e
h.t = d
h.y = d
h.v = i
assert d.v.o.t.s.o.y.o.v.txt == "e"