class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: G = None
        self.z: C = None
        self.r: D = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: D = None
        self.z: D = None
        self.w: G = None
        self.q: A = None
        self.u: H = None
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: D = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: C = None
        self.u: E = None
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: D = None
        self.z: D = None
        self.w: G = None
        self.q: A = None
        self.u: H = None
        self.v: C = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.x: D = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: C = None
        self.u: E = None
        self.y: E = None
        self.o: F = None
        self.txt = txt

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

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