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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: I = None
        self.o: A = None
        self.x: E = None
        self.v: C = None
        self.y: I = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.r: G = None
        self.t: B = None
        self.z: E = None
        self.p: H = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.t: I = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.p: I = None
        self.r: A = None
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: I = None
        self.o: A = None
        self.x: E = None
        self.v: C = None
        self.y: I = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.r: G = None
        self.t: B = None
        self.z: E = None
        self.p: H = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.t: I = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.p: I = None
        self.r: A = None
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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