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

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

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

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

e = A("e")
h = B("h")
d = C("d")
n = D("n")
j = C("j")
a = A("a")

e.s = n
h.u = a
h.t = a
h.y = d
d.s = n
d.o = e
d.p = e
d.u = j
n.v = a
n.r = h
n.t = h
j.s = n
j.o = a
j.u = d
j.p = e
a.s = n
assert d.o.s.v.s.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

e = A("e")
h = B("h")
d = C("d")
n = D("n")
j = C("j")
a = A("a")

e.s = n
h.u = a
h.t = a
h.y = d
d.s = n
d.o = e
d.p = e
d.u = j
n.v = a
n.r = h
n.t = h
j.s = n
j.o = a
j.u = d
j.p = e
a.s = n
assert d.o.s.v.s.r.u.txt == "a"