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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.w: B = None
        self.p: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: G = None
        self.w: B = None
        self.p: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

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

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

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