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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: H = None
        self.z: G = None
        self.u: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: C = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: H = None
        self.z: G = None
        self.u: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: C = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.q: F = None
        self.txt = txt

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

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