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

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

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

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

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

j.s = c
j.o = i
a.v = l
a.y = h
a.z = c
e.y = a
e.q = c
e.w = j
e.z = j
i.t = j
i.x = c
i.v = e
b.v = e
b.y = h
b.z = j
c.s = j
c.o = i
n.y = a
n.q = c
n.w = j
n.z = j
h.v = n
h.y = a
h.z = c
f.y = a
f.q = j
f.w = j
f.z = j
l.y = h
l.q = j
l.w = j
l.z = c
assert a.v.z.s.o.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

j.s = c
j.o = i
a.v = l
a.y = h
a.z = c
e.y = a
e.q = c
e.w = j
e.z = j
i.t = j
i.x = c
i.v = e
b.v = e
b.y = h
b.z = j
c.s = j
c.o = i
n.y = a
n.q = c
n.w = j
n.z = j
h.v = n
h.y = a
h.z = c
f.y = a
f.q = j
f.w = j
f.z = j
l.y = h
l.q = j
l.w = j
l.z = c
assert a.v.z.s.o.x.o.txt == "i"