class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: D = None
        self.s: D = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.t: I = None
        self.w: D = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: D = None
        self.t: I = None
        self.w: D = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: G = None
        self.v: C = None
        self.txt = txt

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

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