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

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

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

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

e = A("e")
n = B("n")
m = C("m")
j = D("j")
l = C("l")
d = D("d")
f = D("f")
c = A("c")
a = D("a")
k = B("k")

e.u = l
e.v = c
e.t = c
e.q = a
n.v = k
m.r = e
m.s = d
m.v = f
m.z = k
j.r = c
j.t = c
j.x = c
j.w = e
l.r = e
l.s = a
l.v = a
l.z = n
d.r = e
d.w = e
d.x = e
d.t = c
f.r = c
f.t = c
f.x = c
f.w = e
c.u = m
c.v = e
c.t = e
c.q = j
a.r = e
a.x = e
a.w = c
a.t = c
k.v = n
assert c.u.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: A = None
        self.t: A = None
        self.q: D = None
        self.txt = txt

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

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

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

e = A("e")
n = B("n")
m = C("m")
j = D("j")
l = C("l")
d = D("d")
f = D("f")
c = A("c")
a = D("a")
k = B("k")

e.u = l
e.v = c
e.t = c
e.q = a
n.v = k
m.r = e
m.s = d
m.v = f
m.z = k
j.r = c
j.t = c
j.x = c
j.w = e
l.r = e
l.s = a
l.v = a
l.z = n
d.r = e
d.w = e
d.x = e
d.t = c
f.r = c
f.t = c
f.x = c
f.w = e
c.u = m
c.v = e
c.t = e
c.q = j
a.r = e
a.x = e
a.w = c
a.t = c
k.v = n
assert c.u.z.v.txt == "n"