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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.z: E = None
        self.y: D = None
        self.w: F = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: F = None
        self.t: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.u: H = None
        self.y: F = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.q: I = None
        self.x: E = None
        self.v: I = None
        self.r: E = None
        self.z: G = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

n = A("n")
m = B("m")
b = C("b")
g = D("g")
a = E("a")
c = F("c")
j = G("j")
l = H("l")
h = I("h")
e = J("e")

n.r = m
n.x = c
n.v = e
n.q = g
m.x = c
m.w = c
m.p = b
m.z = a
m.y = g
m.u = h
m.q = e
b.r = j
b.t = n
b.w = m
g.t = c
a.w = l
a.q = c
a.t = n
a.p = h
c.y = j
j.r = a
j.t = n
j.s = b
l.v = b
h.s = m
h.o = m
h.r = g
h.u = l
h.y = c
e.t = a
e.x = a
e.r = a
e.y = a
e.w = a
e.s = b
e.q = h
e.v = h
e.z = j
assert l.v.w.q.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: F = None
        self.v: J = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.z: E = None
        self.y: D = None
        self.w: F = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: F = None
        self.t: A = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: A = None
        self.s: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.u: H = None
        self.y: F = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.q: I = None
        self.x: E = None
        self.v: I = None
        self.r: E = None
        self.z: G = None
        self.y: E = None
        self.w: E = None
        self.txt = txt

n = A("n")
m = B("m")
b = C("b")
g = D("g")
a = E("a")
c = F("c")
j = G("j")
l = H("l")
h = I("h")
e = J("e")

n.r = m
n.x = c
n.v = e
n.q = g
m.x = c
m.w = c
m.p = b
m.z = a
m.y = g
m.u = h
m.q = e
b.r = j
b.t = n
b.w = m
g.t = c
a.w = l
a.q = c
a.t = n
a.p = h
c.y = j
j.r = a
j.t = n
j.s = b
l.v = b
h.s = m
h.o = m
h.r = g
h.u = l
h.y = c
e.t = a
e.x = a
e.r = a
e.y = a
e.w = a
e.s = b
e.q = h
e.v = h
e.z = j
assert l.v.w.q.s.w.txt == "m"