class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.x: D = None
        self.r: F = None
        self.z: I = None
        self.y: G = None
        self.u: E = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: C = None
        self.w: A = None
        self.p: C = None
        self.o: E = None
        self.q: D = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.u: A = None
        self.r: B = None
        self.w: H = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: C = None
        self.w: A = None
        self.p: C = None
        self.o: E = None
        self.q: D = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.u: A = None
        self.r: B = None
        self.w: H = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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