class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.z: F = None
        self.y: F = None
        self.w: D = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: B = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

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

n = A("n")
i = B("i")
l = C("l")
k = D("k")
c = E("c")
e = F("e")
d = G("d")
m = H("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: B = None
        self.y: H = None
        self.r: D = None
        self.txt = txt

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

n = A("n")
i = B("i")
l = C("l")
k = D("k")
c = E("c")
e = F("e")
d = G("d")
m = H("m")

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