class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.x: I = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: C = None
        self.x: D = None
        self.q: G = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.y: D = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.w: A = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: C = None
        self.x: D = None
        self.q: G = None
        self.o: C = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: E = None
        self.y: D = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.w: A = None
        self.u: A = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

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

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

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