class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.v: B = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.s: J = None
        self.q: A = None
        self.t: D = None
        self.z: I = None
        self.v: B = None
        self.y: A = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: G = None
        self.v: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.u: I = None
        self.t: J = None
        self.z: B = None
        self.o: G = None
        self.y: C = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.z: D = None
        self.o: E = None
        self.q: G = None
        self.s: I = None
        self.u: D = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.y: J = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.s: J = None
        self.q: A = None
        self.t: D = None
        self.z: I = None
        self.v: B = None
        self.y: A = None
        self.r: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: G = None
        self.v: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.u: I = None
        self.t: J = None
        self.z: B = None
        self.o: G = None
        self.y: C = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: J = None
        self.z: D = None
        self.o: E = None
        self.q: G = None
        self.s: I = None
        self.u: D = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: G = None
        self.y: J = None
        self.r: C = None
        self.txt = txt

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

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

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