class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: B = None
        self.w: J = None
        self.s: I = None
        self.x: B = None
        self.q: D = None
        self.t: I = None
        self.v: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.z: A = None
        self.w: F = None
        self.r: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.z: A = None
        self.w: F = None
        self.r: G = None
        self.v: D = None
        self.txt = txt

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

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