class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.z: A = None
        self.x: D = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: F = None
        self.z: J = None
        self.s: I = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.s: E = None
        self.p: J = None
        self.y: G = None
        self.r: C = None
        self.v: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: I = None
        self.z: A = None
        self.q: H = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.z: A = None
        self.x: D = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: F = None
        self.z: J = None
        self.s: I = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.z: I = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.s: E = None
        self.p: J = None
        self.y: G = None
        self.r: C = None
        self.v: E = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: I = None
        self.z: A = None
        self.q: H = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

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