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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.o: A = None
        self.s: G = None
        self.w: I = None
        self.z: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: H = None
        self.u: B = None
        self.z: F = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: F = None
        self.q: F = None
        self.u: A = None
        self.x: A = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.o: A = None
        self.s: G = None
        self.w: I = None
        self.z: D = None
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: H = None
        self.u: B = None
        self.z: F = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: F = None
        self.q: F = None
        self.u: A = None
        self.x: A = None
        self.v: F = None
        self.txt = txt

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

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