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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: H = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.z: D = None
        self.txt = txt

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

c.y = k
c.w = n
c.r = n
k.q = l
k.u = h
k.x = d
n.t = b
n.p = i
m.v = n
m.r = n
m.o = b
m.t = c
m.z = h
m.u = h
h.s = c
h.z = b
h.o = b
d.r = j
d.v = m
d.q = n
d.z = n
d.x = k
d.s = k
d.o = c
d.p = h
j.z = k
j.r = i
j.s = b
j.o = h
i.u = c
i.v = b
i.z = m
l.r = j
l.v = m
l.q = n
l.z = n
l.x = k
l.s = k
l.o = c
l.p = h
b.z = k
b.r = i
b.s = j
b.o = h
assert l.x.q.r.z.u.o.z.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: H = None
        self.s: G = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.z: D = None
        self.txt = txt

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

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