class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.r: G = None
        self.p: E = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.z: C = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.s: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.r: G = None
        self.p: E = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.z: C = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: F = None
        self.s: D = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.txt = txt

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

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