class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: C = None
        self.w: G = None
        self.v: E = None
        self.s: G = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: H = None
        self.z: D = None
        self.o: I = None
        self.p: I = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.v: I = None
        self.w: G = None
        self.t: G = None
        self.r: G = None
        self.p: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.r: E = None
        self.p: C = None
        self.v: F = None
        self.o: C = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

j = A("j")
f = B("f")
h = C("h")
m = D("m")
g = E("g")
b = F("b")
n = G("n")
c = H("c")
e = I("e")
a = A("a")

j.y = e
j.v = e
j.w = b
f.y = b
h.o = e
h.x = e
h.r = c
m.z = b
m.y = h
m.q = h
m.w = n
m.s = n
m.v = g
m.r = g
g.z = m
g.w = m
g.v = a
b.q = g
b.z = e
n.u = h
n.w = c
n.z = m
n.o = e
n.p = e
n.y = g
n.s = j
c.s = h
c.u = g
c.q = g
c.v = e
c.w = n
c.t = n
c.r = n
c.p = n
c.x = n
e.t = c
e.x = c
e.q = g
e.r = g
e.p = h
e.o = h
e.v = b
e.z = n
a.y = e
a.v = e
a.w = b
assert b.z.v.z.q.w.z.z.v.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: H = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: C = None
        self.w: G = None
        self.v: E = None
        self.s: G = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: D = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: H = None
        self.z: D = None
        self.o: I = None
        self.p: I = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: E = None
        self.v: I = None
        self.w: G = None
        self.t: G = None
        self.r: G = None
        self.p: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.r: E = None
        self.p: C = None
        self.v: F = None
        self.o: C = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

j = A("j")
f = B("f")
h = C("h")
m = D("m")
g = E("g")
b = F("b")
n = G("n")
c = H("c")
e = I("e")
a = A("a")

j.y = e
j.v = e
j.w = b
f.y = b
h.o = e
h.x = e
h.r = c
m.z = b
m.y = h
m.q = h
m.w = n
m.s = n
m.v = g
m.r = g
g.z = m
g.w = m
g.v = a
b.q = g
b.z = e
n.u = h
n.w = c
n.z = m
n.o = e
n.p = e
n.y = g
n.s = j
c.s = h
c.u = g
c.q = g
c.v = e
c.w = n
c.t = n
c.r = n
c.p = n
c.x = n
e.t = c
e.x = c
e.q = g
e.r = g
e.p = h
e.o = h
e.v = b
e.z = n
a.y = e
a.v = e
a.w = b
assert b.z.v.z.q.w.z.z.v.z.z.txt == "n"