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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: H = None
        self.o: B = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.s: F = None
        self.x: A = None
        self.t: D = None
        self.p: C = None
        self.v: B = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: D = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: H = None
        self.o: B = None
        self.s: B = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: C = None
        self.s: F = None
        self.x: A = None
        self.t: D = None
        self.p: C = None
        self.v: B = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: D = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: H = None
        self.txt = txt

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

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