class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.y: G = None
        self.q: H = None
        self.z: G = None
        self.o: F = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.o: E = None
        self.w: E = None
        self.x: E = None
        self.y: A = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.z: F = None
        self.q: E = None
        self.w: H = None
        self.y: B = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.r: A = None
        self.q: D = None
        self.w: F = None
        self.u: A = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: A = None
        self.o: E = None
        self.w: E = None
        self.x: E = None
        self.y: A = None
        self.u: A = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: H = None
        self.z: F = None
        self.q: E = None
        self.w: H = None
        self.y: B = None
        self.v: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.r: A = None
        self.q: D = None
        self.w: F = None
        self.u: A = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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