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

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

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

l = A("l")
a = B("a")
j = C("j")
b = A("b")
g = C("g")
c = A("c")
e = C("e")
n = A("n")
m = A("m")
k = C("k")

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

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

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

l = A("l")
a = B("a")
j = C("j")
b = A("b")
g = C("g")
c = A("c")
e = C("e")
n = A("n")
m = A("m")
k = C("k")

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