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

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

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

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

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

d.o = j
d.z = j
d.s = a
d.t = a
l.v = b
l.z = a
l.p = e
l.t = e
m.y = d
m.r = j
m.s = i
n.o = e
n.q = m
n.t = j
n.r = j
i.o = n
i.z = n
i.s = m
i.t = a
e.v = l
e.t = l
e.z = m
e.p = b
a.y = d
a.s = d
a.r = n
b.v = e
b.p = e
b.z = a
b.t = l
j.o = e
j.q = m
j.t = n
j.r = n
assert a.r.q.s.t.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: D = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

d.o = j
d.z = j
d.s = a
d.t = a
l.v = b
l.z = a
l.p = e
l.t = e
m.y = d
m.r = j
m.s = i
n.o = e
n.q = m
n.t = j
n.r = j
i.o = n
i.z = n
i.s = m
i.t = a
e.v = l
e.t = l
e.z = m
e.p = b
a.y = d
a.s = d
a.r = n
b.v = e
b.p = e
b.z = a
b.t = l
j.o = e
j.q = m
j.t = n
j.r = n
assert a.r.q.s.t.r.t.txt == "j"