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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.u: I = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.o: A = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.w: H = None
        self.q: A = None
        self.v: I = None
        self.u: D = None
        self.y: H = None
        self.r: J = None
        self.x: E = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.r: C = None
        self.x: E = None
        self.u: E = None
        self.o: C = None
        self.s: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.y: I = None
        self.r: H = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.q: H = None
        self.z: G = None
        self.u: I = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: G = None
        self.o: A = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.w: H = None
        self.q: A = None
        self.v: I = None
        self.u: D = None
        self.y: H = None
        self.r: J = None
        self.x: E = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: B = None
        self.r: C = None
        self.x: E = None
        self.u: E = None
        self.o: C = None
        self.s: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: E = None
        self.y: I = None
        self.r: H = None
        self.q: H = None
        self.o: I = None
        self.txt = txt

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

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