class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.r: G = None
        self.y: D = None
        self.t: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.u: I = None
        self.w: B = None
        self.y: F = None
        self.x: G = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: A = None
        self.r: G = None
        self.y: D = None
        self.t: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.u: I = None
        self.w: B = None
        self.y: F = None
        self.x: G = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.t: F = None
        self.s: B = None
        self.txt = txt

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

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