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

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

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

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

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

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

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

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

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

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

c.v = d
c.x = n
b.u = n
b.s = i
b.v = j
b.t = l
l.s = a
l.q = c
l.r = c
l.w = b
g.t = d
g.z = m
j.s = a
j.q = i
j.r = i
j.w = n
a.u = b
a.s = c
a.v = l
a.t = l
i.v = d
i.x = n
n.u = b
n.s = c
n.v = j
n.t = j
m.t = d
m.z = d
d.t = g
d.z = g
assert i.x.u.t.s.t.txt == "l"