class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: C = None
        self.t: G = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.o: A = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.x: I = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: F = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.u: D = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.o: A = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.x: I = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: F = None
        self.w: H = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.u: D = None
        self.x: F = None
        self.txt = txt

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

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

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