class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.o: G = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.r: B = None
        self.s: C = None
        self.z: B = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

n = A("n")
e = B("e")
i = C("i")
k = D("k")
j = E("j")
c = F("c")
m = G("m")
a = E("a")

n.z = i
n.t = m
n.o = m
n.w = m
n.y = m
e.q = k
e.u = c
e.y = j
i.u = e
i.z = a
i.r = a
i.t = a
i.w = n
i.p = m
i.y = k
k.p = i
k.u = i
k.s = a
j.p = k
c.y = e
c.r = e
c.z = e
c.x = e
c.p = e
c.o = k
c.s = i
m.o = i
a.p = k
assert m.o.w.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.o: G = None
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: E = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.r: B = None
        self.s: C = None
        self.z: B = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

n = A("n")
e = B("e")
i = C("i")
k = D("k")
j = E("j")
c = F("c")
m = G("m")
a = E("a")

n.z = i
n.t = m
n.o = m
n.w = m
n.y = m
e.q = k
e.u = c
e.y = j
i.u = e
i.z = a
i.r = a
i.t = a
i.w = n
i.p = m
i.y = k
k.p = i
k.u = i
k.s = a
j.p = k
c.y = e
c.r = e
c.z = e
c.x = e
c.p = e
c.o = k
c.s = i
m.o = i
a.p = k
assert m.o.w.w.o.txt == "i"