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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: C = None
        self.w: D = None
        self.r: F = None
        self.v: E = None
        self.y: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.y: D = None
        self.o: B = None
        self.u: D = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

n = A("n")
i = B("i")
e = C("e")
k = D("k")
a = E("a")
h = F("h")
g = G("g")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: C = None
        self.w: D = None
        self.r: F = None
        self.v: E = None
        self.y: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.y: D = None
        self.o: B = None
        self.u: D = None
        self.z: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.txt = txt

n = A("n")
i = B("i")
e = C("e")
k = D("k")
a = E("a")
h = F("h")
g = G("g")
d = C("d")

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