class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: C = None
        self.w: I = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.z: H = None
        self.u: C = None
        self.o: H = None
        self.t: F = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.u: F = None
        self.w: C = None
        self.r: H = None
        self.o: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.w: F = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: C = None
        self.w: I = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.z: H = None
        self.u: C = None
        self.o: H = None
        self.t: F = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.u: F = None
        self.w: C = None
        self.r: H = None
        self.o: D = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: E = None
        self.w: F = None
        self.y: D = None
        self.p: E = None
        self.txt = txt

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

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

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