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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.v: G = None
        self.o: G = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.v: G = None
        self.o: G = None
        self.y: A = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: D = None
        self.txt = txt

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

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

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